[
  {
    "path": ".deployment/storefront-app/argoDeploy.json",
    "content": "{\n    \"artifactKey\": \"docker.pkg.github.com/virtocommerce/vc-storefront/storefront\",\n    \"deployRepo\": \"vc-deploy-dev\",\n    \"cmPath\": \"storefront-app/resources/kustomization.yaml\",\n    \"dev\": {\n        \"deployAppName\": \"storefront-dev\",\n        \"deployBranch\": \"dev\",\n        \"environmentId\" : \"dev\",\n        \"environmentName\" : \"Development\",\n        \"environmentType\" : \"staging\",\n        \"environmentUrl\" : \"https://st-storefront.dev.govirto.com/\"\n    },\n    \"qa\": {\n        \"deployAppName\": \"storefront-qa\",\n        \"deployBranch\": \"qa\",\n        \"environmentId\" : \"qa\",\n        \"environmentName\" : \"QA\",\n        \"environmentType\" : \"testing\",\n        \"environmentUrl\" : \"https://st-storefront.qa.govirto.com/\"\n    },\n     \"prod\": {\n        \"deployAppName\": \"storefront-demo\",\n        \"deployBranch\": \"demo\",\n        \"environmentId\" : \"demo\",\n        \"environmentName\" : \"Demo\",\n        \"environmentType\" : \"production\",\n        \"environmentUrl\" : \"https://st-storefront.demo.govirto.com/\"\n    }\n}\n"
  },
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 4\nend_of_line = crlf\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n# Project files\n[*.csproj]\nindent_size = 2\n\n# JSON files\n[*.json]\nindent_size = 2\n\n# Dotnet code style settings\n[*.{cs,vb}]\n\n# Sort using and Import directives with System.* appearing first\ndotnet_sort_system_directives_first = true\n\n# Avoid \"this.\" and \"Me.\" if not necessary\ndotnet_style_qualification_for_field = false:suggestion\ndotnet_style_qualification_for_property = false:suggestion\ndotnet_style_qualification_for_method = false:suggestion\ndotnet_style_qualification_for_event = false:suggestion\n\n# Use language keywords instead of framework type names for type references\ndotnet_style_predefined_type_for_locals_parameters_members = true:suggestion\ndotnet_style_predefined_type_for_member_access = true:suggestion\n\n# Use explicit accessibility modifiers\ndotnet_style_require_accessibility_modifiers = true:suggestion\n\n# Suggest more modern language features when available\ndotnet_style_object_initializer = true:suggestion\ndotnet_style_collection_initializer = true:suggestion\ndotnet_style_coalesce_expression = true:suggestion\ndotnet_style_null_propagation = true:suggestion\ndotnet_style_explicit_tuple_names = true:suggestion\ndotnet_prefer_inferred_tuple_names = true:suggestion\ndotnet_prefer_inferred_anonymous_type_member_names = true:suggestion\n\n# CSharp code style settings\n[*.cs]\n\n# Prefer curly braces even for one line of code\ncsharp_prefer_braces = true:suggestion\n\n# Prefer \"var\" everywhere\ncsharp_style_var_for_built_in_types = true:suggestion\ncsharp_style_var_when_type_is_apparent = true:suggestion\ncsharp_style_var_elsewhere = true:suggestion\n\n# Prefer method-like constructs to have a block body\ncsharp_style_expression_bodied_methods = false:none\ncsharp_style_expression_bodied_constructors = false:none\ncsharp_style_expression_bodied_operators = false:none\n\n# Prefer property-like constructs to have an expression-body\ncsharp_style_expression_bodied_properties = true:none\ncsharp_style_expression_bodied_indexers = true:none\ncsharp_style_expression_bodied_accessors = true:none\n\n# Suggest more modern language features when available\ncsharp_style_pattern_matching_over_is_with_cast_check = true:suggestion\ncsharp_style_pattern_matching_over_as_with_null_check = true:suggestion\ncsharp_style_inlined_variable_declaration = true:suggestion\ncsharp_style_throw_expression = true:suggestion\ncsharp_style_conditional_delegate_call = true:suggestion\ncsharp_prefer_simple_default_expression = true:suggestion\ncsharp_style_deconstructed_variable_declaration = true:suggestion\ncsharp_style_pattern_local_over_anonymous_function = true:suggestion\n\n# Newline settings\ncsharp_new_line_before_open_brace = all\ncsharp_new_line_before_else = true\ncsharp_new_line_before_catch = true\ncsharp_new_line_before_finally = true\ncsharp_new_line_before_members_in_object_initializers = true\ncsharp_new_line_before_members_in_anonymous_types = true\ncsharp_new_line_between_query_expression_clauses = true\n\ncsharp_indent_case_contents = true\ncsharp_indent_switch_labels = true\ncsharp_indent_labels = flush_left\n\ncsharp_space_after_cast = false\ncsharp_space_after_keywords_in_control_flow_statements = true\ncsharp_space_between_method_declaration_parameter_list_parentheses = false\ncsharp_space_between_method_call_parameter_list_parentheses = false\ncsharp_space_between_parentheses = false\n\ncsharp_preserve_single_line_statements = false\ncsharp_preserve_single_line_blocks = true\n"
  },
  {
    "path": ".gitattributes",
    "content": "###############################################################################\n# Set default behavior to automatically normalize line endings.\n###############################################################################\n* text=auto\n\n*.bat    text eol=crlf\n*.cmd    text eol=crlf\n*.config text eol=crlf\n\n###############################################################################\n# Set default behavior for command prompt diff.\n#\n# This is need for earlier builds of msysgit that does not have it on by\n# default for csharp files.\n# Note: This is only used by command line\n###############################################################################\n#*.cs     diff=csharp\n\n###############################################################################\n# Set the merge driver for project and solution files\n#\n# Merging from the command prompt will add diff markers to the files if there\n# are conflicts (Merging from VS is not affected by the settings below, in VS\n# the diff markers are never inserted). Diff markers may cause the following \n# file extensions to fail to load in VS. An alternative would be to treat\n# these files as binary and thus will always conflict and require user\n# intervention with every merge. To do so, just uncomment the entries below\n###############################################################################\n#*.sln       merge=binary\n#*.csproj    merge=binary\n#*.vbproj    merge=binary\n#*.vcxproj   merge=binary\n#*.vcproj    merge=binary\n#*.dbproj    merge=binary\n#*.fsproj    merge=binary\n#*.lsproj    merge=binary\n#*.wixproj   merge=binary\n#*.modelproj merge=binary\n#*.sqlproj   merge=binary\n#*.wwaproj   merge=binary\n\n###############################################################################\n# behavior for image files\n#\n# image files are treated as binary by default.\n###############################################################################\n#*.jpg   binary\n#*.png   binary\n#*.gif   binary\n\n###############################################################################\n# diff behavior for common document formats\n# \n# Convert binary document formats to text before diffing them. This feature\n# is only available from the command line. Turn it on by uncommenting the \n# entries below.\n###############################################################################\n#*.doc   diff=astextplain\n#*.DOC   diff=astextplain\n#*.docx  diff=astextplain\n#*.DOCX  diff=astextplain\n#*.dot   diff=astextplain\n#*.DOT   diff=astextplain\n#*.pdf   diff=astextplain\n#*.PDF   diff=astextplain\n#*.rtf   diff=astextplain\n#*.RTF   diff=astextplain\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "content": "Please provide detailed information about your issue, thank you!\n\nVersion info: \n- Browser version: \n- Platform version: \n- Storefront version: \n\n### Expected behavior\n\n### Actual behavior\n\n### Steps to reproduce\n1.\n2.\n3.\n"
  },
  {
    "path": ".github/pull_request_template.md",
    "content": "Description: \n\n\n--\n\nQA-test: \n\nDemo-test: \n\nDownload artifact URL: \n"
  },
  {
    "path": ".github/workflows/deploy.yml",
    "content": "# v1.3.0\n\nname: VC deployment\non:\n  workflow_dispatch:\n    inputs:\n      artifactUrl:\n        description: 'Full link to artifact docker image or artifact download url'\n        required: true\n      deployEnvironment:\n        description: 'Deployment environment type. Allowed values: dev, qa, prod'\n        required: true\n        default: 'dev'\n      deployConfigPath:\n        description: 'Full path to argoDeploy.json'\n        required: true\n        default: 'argoDeploy.json'\n      jiraKeys:\n        description: 'Deployed artifact Jira keys (for cycle time report)'\n        required: false\n        default: ''\n\njobs:\n  cd:\n    runs-on: ubuntu-latest\n    env:\n      GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}\n      CLOUD_INSTANCE_BASE_URL: ${{secrets.CLOUD_INSTANCE_BASE_URL}}\n      CLIENT_ID: ${{secrets.CLIENT_ID}}\n      CLIENT_SECRET: ${{secrets.CLIENT_SECRET}}\n      SLEEP_TIME: '5m'\n      ARGO_SERVER: 'argo.govirto.com'\n\n    steps:\n\n    - name: Install vc-build \n      run: |\n        dotnet tool install --global VirtoCommerce.GlobalTool\n    \n    - name: Set Output\n      id: app-name\n      run: |\n          if [ ${{ github.ref }} == 'refs/heads/master' ]; then\n            echo \"IS master branch\"\n            echo \"APP=vcptcore-qa\" >> $GITHUB_OUTPUT\n          elif [ ${{ github.ref }} == 'refs/heads/dev' ]; then\n            echo \"IS dev branch\"\n            echo \"APP=vcst-dev\" >> $GITHUB_OUTPUT\n          fi\n    \n    - name: Read deployment config\n      uses: VirtoCommerce/vc-github-actions/get-deploy-param@master\n      id: deployConfig\n      with:\n        envName: ${{ github.event.inputs.deployEnvironment }}\n        deployConfigPath: ${{ github.event.inputs.deployConfigPath }}\n\n    - name: Start deployment\n      uses: VirtoCommerce/vc-github-actions/gh-deployments@master\n      id: deployment\n      with:\n        step: start\n        token: ${{ secrets.GITHUB_TOKEN }}\n        env: ${{ steps.deployConfig.outputs.environmentName }}\n        no_override: false\n\n    - name: Update vcptcore-qa environment\n      if: ${{ github.ref == 'refs/heads/master' }}\n      run: |\n        vc-build CloudEnvSetParameter -EnvironmentName ${{ steps.app-name.outputs.APP }} -CloudToken ${{ secrets.VCPTCORE_PLATFORM_TOKEN }} -HelmParameters storefront.image.tag=${{ github.event.inputs.artifactUrl }}\n    \n    - name: Update vcst-dev environment\n      if: ${{ github.ref == 'refs/heads/dev' }}\n      run: |\n        vc-build CloudEnvSetParameter -EnvironmentName ${{ steps.app-name.outputs.APP }} -CloudToken ${{ secrets.VCST_PLATFORM_TOKEN }} -HelmParameters storefront.image.tag=${{ github.event.inputs.artifactUrl }}\n\n    - name: DEPLOY_STATE::successful\n      if: success()\n      run: echo \"DEPLOY_STATE=successful\" >> $GITHUB_ENV\n\n    - name: DEPLOY_STATE::failed\n      if: failure()\n      run: echo \"DEPLOY_STATE=failed\"  >> $GITHUB_ENV\n\n    - name: Update GitHub deployment status\n      uses: VirtoCommerce/vc-github-actions/gh-deployments@master\n      if: always()\n      with:\n        step: finish\n        token: ${{ secrets.GITHUB_TOKEN }}\n        status: ${{ job.status }}\n        deployment_id: ${{ steps.deployment.outputs.deployment_id }}\n\n    - name: Push Deployment Info to Jira\n      if: ${{ env.CLOUD_INSTANCE_BASE_URL != 0 && env.CLIENT_ID != 0 && env.CLIENT_SECRET != 0 && github.event.inputs.jiraKeys != '' && always() }}\n      id: push_deployment_info_to_jira\n      uses: VirtoCommerce/jira-upload-deployment-info@master\n      env:\n        CLOUD_INSTANCE_BASE_URL: ${{secrets.CLOUD_INSTANCE_BASE_URL}}\n        CLIENT_ID: ${{secrets.CLIENT_ID}}\n        CLIENT_SECRET: ${{secrets.CLIENT_SECRET}}\n      with:\n        cloud-instance-base-url: ${{ secrets.CLOUD_INSTANCE_BASE_URL }}\n        client-id: ${{ secrets.CLIENT_ID }}\n        client-secret: ${{ secrets.CLIENT_SECRET }}\n        deployment-sequence-number: ${{ github.run_id }}\n        update-sequence-number: ${{ github.run_id }}\n        issue-keys: ${{ github.event.inputs.jiraKeys }}\n        display-name: ${{ steps.deployConfig.outputs.deployAppName }}\n        url: ${{ steps.deployConfig.outputs.environmentUrl }}\n        description: 'Deployment to the ${{ steps.deployConfig.outputs.environmentName }} environment'\n        last-updated: '${{github.event.head_commit.timestamp}}'\n        state: '${{ env.DEPLOY_STATE }}'\n        pipeline-id: '${{ github.repository }} ${{ github.workflow }}'\n        pipeline-display-name: 'Workflow: ${{ github.workflow }} (#${{ github.run_number }})'\n        pipeline-url: '${{github.event.repository.html_url}}/actions/runs/${{github.run_id}}'\n        environment-id: ${{ steps.deployConfig.outputs.environmentId }}\n        environment-display-name: ${{ steps.deployConfig.outputs.environmentName }}\n        environment-type: ${{ steps.deployConfig.outputs.environmentType }}\n"
  },
  {
    "path": ".github/workflows/main.yml",
    "content": "# v1.2.1\nname: Storefront CI\n\non:\n  workflow_dispatch:\n    inputs:\n      forceLatest:\n        description: \"Flag to set dev-linux-latest flag on workflow_dispatch event. Allowed values true or false.\"\n        required: false\n        default: \"false\"\n\n  push:\n    paths-ignore:\n      - '.github/**'\n      - 'docs/**'\n      - 'build/**'\n      - 'README.md'\n      - 'LICENSE'\n      - '**/argoDeploy.json'\n    branches: [ master, dev ]\n\njobs:\n  ci:\n    if: ${{ github.actor != 'dependabot[bot]' && (github.event.pull_request.head.repo.full_name == github.repository || github.event.pull_request.head.repo.full_name == '') }}  # Check that PR not from forked repo and not from Dependabot\n    runs-on: ubuntu-latest\n    env:\n      CLOUD_INSTANCE_BASE_URL: ${{secrets.CLOUD_INSTANCE_BASE_URL}}\n      CLIENT_ID: ${{secrets.CLIENT_ID}}\n      CLIENT_SECRET: ${{secrets.CLIENT_SECRET}}\n      SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}\n      GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}\n      NUGET_KEY: ${{ secrets.NUGET_KEY }}\n      BLOB_SAS: ${{ secrets.BLOB_TOKEN }}\n      IMAGE_NAME: 'storefront'\n      PACKAGE_SERVER: 'ghcr.io'\n      PUBLISH_TO_DOCKER: 'true'\n      UPDATE_LATEST_TAG: 'true'\n      VERSION_SUFFIX: ''\n      BUILD_STATE: 'failed'\n      RELEASE_STATUS: 'false'\n      BUILD_DOCKER: 'false'\n    outputs:\n      artifactUrl:  ${{ steps.image.outputs.taggedVersion }}\n      jira-keys: ${{ steps.jira_keys.outputs.jira-keys }}\n\n    steps:\n\n    - name: Set up Node 20\n      uses: actions/setup-node@v4\n      with:\n          node-version: '20'\n            \n    - name: Set up Java 17\n      uses: actions/setup-java@v4\n      with:\n        distribution: 'temurin'\n        java-version: '17'\n\n    - name: Set variables\n      if: ${{ github.event_name == 'workflow_dispatch' }}\n      run: |\n        echo \"PUBLISH_TO_DOCKER=false\" >> $GITHUB_ENV\n        echo \"UPDATE_LATEST_TAG=${{ github.event.inputs.forceLatest }}\" >> $GITHUB_ENV\n\n    - name: Set RELEASE_STATUS\n      if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }}\n      run: |\n        echo \"RELEASE_STATUS=true\" >> $GITHUB_ENV\n\n    - name: Set BUILD_DOCKER\n      if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/dev-dockerenv' || github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/master') }}\n      run: |\n        echo \"BUILD_DOCKER=true\" >> $GITHUB_ENV\n\n    - uses: actions/checkout@v4\n      with:\n        fetch-depth: 0\n\n    - name: Install VirtoCommerce.GlobalTool\n      uses: VirtoCommerce/vc-github-actions/setup-vcbuild@master\n\n    - name: Install dotnet-sonarscanner\n      run: dotnet tool install --global dotnet-sonarscanner\n\n    - name: Get Image Version\n      uses: VirtoCommerce/vc-github-actions/get-image-version@master\n      id: image\n\n    - name: Get changelog\n      id: changelog\n      uses: VirtoCommerce/vc-github-actions/changelog-generator@master\n\n    - name: Set VERSION_SUFFIX variable\n      run: |\n        if [ '${{ github.event_name }}' = 'workflow_dispatch' ]; then\n          echo \"VERSION_SUFFIX=${{ steps.image.outputs.fullSuffix }}\" >> $GITHUB_ENV\n        else\n          echo \"VERSION_SUFFIX=${{ steps.image.outputs.suffix }}\" >> $GITHUB_ENV\n        fi;\n\n    - name: Add version suffix\n      if: ${{ github.ref != 'refs/heads/master' }}\n      uses: VirtoCommerce/vc-github-actions/add-version-suffix@master\n      with:\n        versionSuffix: ${{ env.VERSION_SUFFIX }}\n\n    - name: SonarCloud Begin\n      uses: VirtoCommerce/vc-github-actions/sonar-scanner-begin@master\n\n    - name: Build\n      run: vc-build Compile\n\n    - name: Unit Tests\n      run: vc-build Test -TestsFilter \"Category=Unit|Category=CI\" -skip\n\n    - name: BUILD_STATE::successful\n      if: success()\n      run: echo \"BUILD_STATE=successful\" >> $GITHUB_ENV\n\n    - name: SonarCloud End\n      uses: VirtoCommerce/vc-github-actions/sonar-scanner-end@master\n\n    - name: Quality Gate\n      uses: VirtoCommerce/vc-github-actions/sonar-quality-gate@master\n      with:\n        login: ${{secrets.SONAR_TOKEN}}\n\n    - name: Packaging\n      run: vc-build Compress -skip Clean+Restore+Compile+Test\n\n    - name: Set artifactUrl value\n      id: artifactUrl\n      run: |\n        echo \"DOCKER_URL=${{ env.PACKAGE_SERVER }}/${{github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ steps.image.outputs.taggedVersion }}\" >> $GITHUB_OUTPUT\n\n    - name: Build Docker Image\n      if: ${{ env.BUILD_DOCKER == 'true' }}\n      id: dockerBuild\n      uses: VirtoCommerce/vc-github-actions/build-docker-image@master\n      with:\n        tag: ${{ steps.image.outputs.taggedVersion }}\n        imageName: ${{ env.IMAGE_NAME }}\n        dockerFiles: 'https://raw.githubusercontent.com/VirtoCommerce/vc-docker/feat/net8/linux/storefront/Dockerfile'\n\n    - name: Publish Github Release\n      if: ${{ github.ref == 'refs/heads/master' }}\n      with:\n        changelog: ${{ steps.changelog.outputs.changelog }}\n      uses: VirtoCommerce/vc-github-actions/publish-github-release@master\n\n    - name: Docker Login\n      if: ${{ env.BUILD_DOCKER == 'true' }}\n      uses: docker/login-action@v3\n      with:\n        registry: ${{ env.PACKAGE_SERVER }}\n        username: $GITHUB_ACTOR\n        password: ${{ secrets.GITHUB_TOKEN }}\n\n    - name: Publish Docker Image\n      if: ${{ env.BUILD_DOCKER == 'true' }}\n      uses: VirtoCommerce/vc-github-actions/publish-docker-image@master\n      with:\n          image: ${{ steps.dockerBuild.outputs.imageName }}\n          tag: ${{ steps.image.outputs.taggedVersion }}\n          docker_user: ${{ secrets.DOCKER_USERNAME }}\n          docker_token: ${{ secrets.DOCKER_TOKEN }}\n          docker_hub: ${{ env.PUBLISH_TO_DOCKER }}\n          update_latest: ${{ env.UPDATE_LATEST_TAG }}\n    \n    - name: Publish to SaaS ACR\n      if: ${{ github.ref == 'refs/heads/master' }}\n      run: |\n        docker login virtopaasregistrymain.azurecr.io -u VirtoPaaSRegistryMain -p ${{secrets.ACR_PASSWORD}}\n        docker tag ghcr.io/virtocommerce/${{ env.IMAGE_NAME }}:${{ steps.image.outputs.taggedVersion }} virtopaasregistrymain.azurecr.io/saas/${{ env.IMAGE_NAME }}:${{ steps.image.outputs.taggedVersion }}\n        docker push virtopaasregistrymain.azurecr.io/saas/${{ env.IMAGE_NAME }}:${{ steps.image.outputs.taggedVersion }}\n    \n    - name: Publish to ACR \n      run: |\n        docker login virtopaasregistrymain.azurecr.io -u vcst-token -p ${{ secrets.VCST_ACR_DOCKER_PASSWORD }}\n        docker tag ghcr.io/virtocommerce/${{ env.IMAGE_NAME }}:${{ steps.image.outputs.taggedVersion }} virtopaasregistrymain.azurecr.io/vcst/${{ env.IMAGE_NAME }}:${{ steps.image.outputs.taggedVersion }}\n        docker push virtopaasregistrymain.azurecr.io/vcst/${{ env.IMAGE_NAME }}:${{ steps.image.outputs.taggedVersion }}\n\n    - name: Add link to PR\n      if: ${{ github.event_name == 'pull_request' }}\n      uses: VirtoCommerce/vc-github-actions/publish-artifact-link@master\n      with:\n        artifactUrl: ${{ steps.artifactUrl.outputs.DOCKER_URL }}\n\n    - name: Parse Jira Keys from All Commits\n      uses: VirtoCommerce/vc-github-actions/get-jira-keys@master\n      if: always()\n      id: jira_keys\n      with:\n        release: ${{ env.RELEASE_STATUS }}\n      env:\n        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n    - name: Push Build Info to Jira\n      if: ${{ env.CLOUD_INSTANCE_BASE_URL != 0 && env.CLIENT_ID != 0 && env.CLIENT_SECRET != 0 && steps.jira_keys.outputs.jira-keys != '' && always() }}\n      id: push_build_info_to_jira\n      uses: VirtoCommerce/jira-upload-build-info@master\n      with:\n        cloud-instance-base-url: '${{ secrets.CLOUD_INSTANCE_BASE_URL }}'\n        client-id: '${{ secrets.CLIENT_ID }}'\n        client-secret: '${{ secrets.CLIENT_SECRET }}'\n        pipeline-id: '${{ github.repository }} ${{ github.workflow }}'\n        build-number: ${{ github.run_number }}\n        build-display-name: 'Workflow: ${{ github.workflow }} (#${{ github.run_number }})'\n        build-state: '${{ env.BUILD_STATE }}'\n        build-url: '${{github.event.repository.url}}/actions/runs/${{github.run_id}}'\n        update-sequence-number: '${{ github.run_id }}'\n        last-updated: '${{github.event.head_commit.timestamp}}'\n        issue-keys: '${{ steps.jira_keys.outputs.jira-keys }}'\n        commit-id: '${{ github.sha }}'\n        repo-url: '${{ github.event.repository.url }}'\n        build-ref-url: '${{ github.event.repository.url }}/actions/runs/${{ github.run_id }}'\n\n    - name: Confirm Jira Build Output\n      if: success()\n      run: |\n        echo \"Jira Upload Build Info response: ${{ steps.push_build_info_to_jira.outputs.response }}\"\n\n  deploy:\n    if: ${{ (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') && (github.event_name == 'push' ||  github.event_name == 'workflow_dispatch')}}\n    needs: ci\n    runs-on: ubuntu-latest\n    env:\n      CONFIG_PATH: '.deployment/storefront-app/argoDeploy.json'\n    steps:\n\n    - name: Set deployment environment\n      id: deployEnv\n      run: |\n        if [ '${{ github.ref }}' = 'refs/heads/master' ]; then\n          echo \"NAME=prod\" >> $GITHUB_OUTPUT\n        else\n          echo \"NAME=dev\" >> $GITHUB_OUTPUT\n        fi;\n\n    - name: Invoke Module deployment workflow\n      uses: benc-uk/workflow-dispatch@v1\n      with:\n        workflow: VC deployment\n        token: ${{ secrets.REPO_TOKEN }}\n        inputs: '{ \"artifactUrl\": \"${{ needs.ci.outputs.artifactUrl }}\", \"deployEnvironment\": \"${{ steps.deployEnv.outputs.NAME }}\", \"deployConfigPath\": \"${{ env.CONFIG_PATH }}\", \"jiraKeys\":\"${{ needs.ci.outputs.jira-keys }}\" }'\n"
  },
  {
    "path": ".github/workflows/msteams.yml",
    "content": "name: Send message to Teams (regression PR)\n\non:\n   pull_request:\n    branches:\n      [regression]\n    \njobs:\n  notify:\n    runs-on: ubuntu-latest\n    steps:\n\n    - name: Send a message to Microsoft Teams\n      uses: VirtoCommerce/vc-github-actions/msteams-send-message@master\n      with:\n        body: '{\n    \"@type\": \"MessageCard\",\n    \"@context\": \"http://schema.org/extensions\",\n    \"themeColor\": \"0076D7\",\n    \"summary\": \"On ${{github.repository}} repository\",\n    \"sections\": [\n        {\n            \"activityTitle\": \"Regression PR created/updated\",\n            \"activitySubtitle\": \"By [${{ github.event.pull_request.user.login }}](${{ github.event.pull_request.user.url }}) on **[${{github.repository}}](${{github.server_url}}/${{github.repository}})** repository\",\n            \"activityImage\":\"${{ github.event.pull_request.user.avatar_url }}\",\n            \"facts\": [\n                {\n                    \"name\": \"Repository\",\n                    \"value\": \"[${{github.repository}}](${{github.server_url}}/${{github.repository}})\"\n                },\n                {\n                    \"name\": \"Pull request\",\n                    \"value\": \"[${{ github.event.pull_request.number }}](${{ github.event.pull_request._links.html.href }})\"\n                },\n                {\n                    \"name\": \"Pull request title\",\n                    \"value\": \"${{ github.event.pull_request.title }}\"\n                }\n\n            ],\n            \"markdown\": true\n        }\n    ],\n    \"potentialAction\": [ {\n        \"@type\": \"OpenUri\",\n        \"name\": \"View Pull Request\",\n        \"targets\": [{\n            \"os\": \"default\",\n            \"uri\": \"${{ github.event.pull_request._links.html.href }}\"\n        }]\n    }]\n\n}'  # the body of the message\n        webhook_uri: ${{ secrets.PLATFORM_TEAMS_URI }} \n"
  },
  {
    "path": ".github/workflows/pr-ci.yml",
    "content": "# v3.800.4\nname: PR build\n\non:\n  workflow_dispatch:\n  pull_request:\n    branches: [ master, dev ]\n    paths-ignore:\n      - '.github/**'\n      - 'docs/**'\n      - 'build/**'\n      - 'README.md'\n      - 'LICENSE'\n      - '**/argoDeploy.json'\n\njobs:\n  test:\n    uses: VirtoCommerce/.github/.github/workflows/test-and-sonar.yml@v3.800.4\n    secrets:\n      sonarToken: ${{ secrets.SONAR_TOKEN }}\n\n  build:\n    uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.800.4\n    with:\n      uploadDocker: 'true'\n      imageName: 'storefront'\n      dockerFiles: 'https://raw.githubusercontent.com/VirtoCommerce/vc-docker/feat/net8/linux/storefront/Dockerfile'\n    secrets:\n      envPAT: ${{ secrets.REPO_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/pr-deploy.yml",
    "content": "# v3.800.4\nname: PR deploy\n\non:\n  pull_request:\n    branches: [ master, dev ]\n    types: [ labeled ]\n\njobs:\n\n  get-deployment-data:\n    if: ${{ github.event.label.name == 'deploy-qa' }}\n    runs-on: ubuntu-latest\n    env:\n      ARTIFACT_NAME: ${{ github.event.repository.name }}\n      DOCKER_CACHE_KEY: ''\n      DOCKER_TAR: 'image.tar'\n    outputs:\n      dockerShortKey: ${{ steps.cache-key.outputs.dockerShortKey }}\n      dockerFullKey: ${{ steps.cache-key.outputs.dockerFullKey }}\n      packageShortKey: ${{ steps.cache-key.outputs.packageShortKey }}\n      packageFullKey: ${{ steps.cache-key.outputs.packageFullKey }}\n      dockerTar: ${{ env.DOCKER_TAR }}\n      jiraKey: ${{ steps.jiraKey.outputs.qaTaskNumber }}\n    steps:\n\n    - uses: actions/checkout@v4\n\n    - name: Get Artifact Version\n      uses: VirtoCommerce/vc-github-actions/get-image-version@master\n      id: artifactVer\n\n    - name: Get cache key\n      uses: VirtoCommerce/vc-github-actions/cache-get-key@master\n      id: cache-key\n      with:\n        runnerOs: ${{ runner.os  }}\n        artifactName: ${{ env.ARTIFACT_NAME }}\n\n    - name: Gets Jira key from PR body\n      id: jiraKey\n      uses: VirtoCommerce/vc-github-actions/pr-body-get-link@master\n      with:\n        skipArtifactUrl: 'true'\n        githubToken: ${{ secrets.REPO_TOKEN }}\n\n  publish:\n    needs:\n      get-deployment-data\n    uses: VirtoCommerce/.github/.github/workflows/publish-docker.yml@v3.800.4\n    with:\n      fullKey: ${{ needs.get-deployment-data.outputs.dockerFullKey }}\n      shortKey: '${{ needs.get-deployment-data.outputs.dockerShortKey }}-'\n      dockerTar: ${{ needs.get-deployment-data.outputs.dockerTar }}\n    secrets:\n      envPAT: ${{ secrets.GITHUB_TOKEN }}\n      dockerUser: ${{ secrets.DOCKER_USERNAME }}\n      dockerToken: ${{ secrets.DOCKER_TOKEN }}\n\n  deploy:\n    needs:\n      [publish, get-deployment-data]\n    uses: VirtoCommerce/.github/.github/workflows/deploy.yml@v3.800.4\n    with:\n      argoServer: 'argo.govirto.com'\n      artifactUrl: ${{ needs.publish.outputs.imagePath }}\n      matrix: '{\"include\":[{\"envName\": \"qa\", \"confPath\": \".deployment/storefront-app/argoDeploy.json\"}]}'\n      taskNumber: ${{ needs.get-deployment-data.outputs.jiraKey }}\n      forceCommit: false\n    secrets:\n      envPAT: ${{ secrets.REPO_TOKEN }}\n      argoLogin: ${{ secrets.ARGOCD_LOGIN }}\n      argoPassword: ${{ secrets.ARGOCD_PASSWORD }}\n\n  comment-publish:\n    if: ${{ always() && github.event.label.name == 'deploy-qa' }}\n    needs:\n      publish\n    env:\n      MESSAGE_BODY: ':x: Docker image publish filed.'\n    runs-on: ubuntu-latest\n    steps:\n\n    - name: Set MESSAGE_BODY\n      if: ${{ needs.publish.result == 'success' }}\n      run: |\n        echo \"MESSAGE_BODY=:heavy_check_mark: Docker image ${{ needs.publish.outputs.imagePath }} published\" >> $GITHUB_ENV\n\n    - name: Add link to PR\n      if: ${{ needs.publish.result == 'success' }}\n      env:\n        GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}\n      uses: VirtoCommerce/vc-github-actions/publish-artifact-link@master\n      with:\n        artifactUrl: ${{ needs.publish.outputs.imagePath }}\n\n    - uses: actions/github-script@v7\n      if: ${{ !(contains('skipped, cancelled', needs.publish.result ))  }}\n      with:\n        #github-token: ${{secrets.GITHUB_TOKEN}}\n        script: |\n          github.rest.issues.createComment({\n            issue_number: context.issue.number,\n            owner: context.repo.owner,\n            repo: context.repo.repo,\n            body: '${{ env.MESSAGE_BODY }}'\n          })\n\n  comment-deploy:\n    if: ${{ always() && github.event.label.name == 'deploy-qa' }}\n    needs:\n      [ deploy, publish ]\n\n    runs-on: ubuntu-latest\n    env:\n      MESSAGE_BODY: ':x: QA deployment failed.'\n    steps:\n\n    - name: Set MESSAGE_BODY\n      if: ${{ needs.deploy.result == 'success' }}\n      run: |\n        echo \"MESSAGE_BODY=:heavy_check_mark: Docker image ${{ needs.publish.outputs.imagePath }} deployed to QA\" >> $GITHUB_ENV\n\n    - uses: actions/github-script@v7\n      if: ${{ !(contains('skipped, cancelled', needs.deploy.result )) }}\n      with:\n        #github-token: ${{secrets.GITHUB_TOKEN}}\n        script: |\n          github.rest.issues.createComment({\n            issue_number: context.issue.number,\n            owner: context.repo.owner,\n            repo: context.repo.repo,\n            body: '${{ env.MESSAGE_BODY }}'\n          })\n"
  },
  {
    "path": ".github/workflows/release-branch.yml",
    "content": "# v3.800.5\nname: Release - branch\n\non:\n  workflow_dispatch:\n    inputs:\n      incrementVersion:\n        description: 'Increment automatically minor\\patch version before release created. If \"none\" version will not be incremented.'\n        required: true\n        default: 'none'\n        type: choice\n        options:\n        - none\n\njobs:\n  test:\n    uses: VirtoCommerce/.github/.github/workflows/test-and-sonar.yml@v3.800.2\n    secrets:\n      sonarToken: ${{ secrets.SONAR_TOKEN }}\n\n  build:\n    uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.800.2\n    with:\n      uploadPackage: 'true'\n      uploadDocker: 'true'\n      eventName: ${{ github.event_name }}\n      imageName: 'storefront'\n      dockerFiles: 'https://raw.githubusercontent.com/VirtoCommerce/vc-docker/feat/net8/linux/storefront/Dockerfile'\n      forceVersionSuffix: 'false'\n    secrets:\n      envPAT: ${{ secrets.REPO_TOKEN }}\n\n  get-metadata:\n    runs-on: ubuntu-latest\n    env:\n      DOCKER_CACHE_KEY: ''\n      DOCKER_TAR: 'image.tar'\n    outputs:\n      dockerShortKey: ${{ steps.cache-key.outputs.dockerShortKey }}\n      dockerFullKey: ${{ steps.cache-key.outputs.dockerFullKey }}\n      packageShortKey: ${{ steps.cache-key.outputs.packageShortKey }}\n      packageFullKey: ${{ steps.cache-key.outputs.packageFullKey }}\n      dockerTar: ${{ env.DOCKER_TAR }}\n      changelog: ${{ steps.changelog.outputs.changelog }}\n    steps:\n\n    - uses: actions/checkout@v4\n      with:\n        fetch-depth: 0\n\n    - name: Get Changelog\n      id: changelog\n      uses: VirtoCommerce/vc-github-actions/changelog-generator@master\n\n    - name: Get Artifact Version\n      uses: VirtoCommerce/vc-github-actions/get-image-version@master\n      id: artifactVer\n\n    - name: Get cache key\n      uses: VirtoCommerce/vc-github-actions/cache-get-key@master\n      id: cache-key\n      with:\n        runnerOs: ${{ runner.os  }}\n        artifactName: ${{ github.event.repository.name }}\n\n  publish-docker:\n    needs:\n      [build, test, get-metadata]\n    uses: VirtoCommerce/.github/.github/workflows/publish-docker.yml@v3.800.2\n    with:\n      fullKey: ${{ needs.get-metadata.outputs.dockerFullKey }}\n      shortKey: '${{ needs.get-metadata.outputs.dockerShortKey }}-'\n      dockerTar: ${{ needs.get-metadata.outputs.dockerTar }}\n      publishToDocker: 'true'\n    secrets:\n      envPAT: ${{ secrets.GITHUB_TOKEN }}\n      dockerUser: ${{ secrets.DOCKER_USERNAME }}\n      dockerToken: ${{ secrets.DOCKER_TOKEN }}\n\n  publish-github-release:\n    needs:\n      [build, test, get-metadata]\n    uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.800.2\n    with:\n      fullKey: ${{ needs.get-metadata.outputs.packageFullKey }}\n      shortKey: '${{ needs.get-metadata.outputs.packageShortKey }}-'\n      changeLog: '${{ needs.get-metadata.outputs.changeLog }}'\n      forceNuget: false\n\n    secrets:\n      envPAT: ${{ secrets.GITHUB_TOKEN }}\n\n"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "# v1.0.0\nname: Release - Quick release\n\non:\n  workflow_dispatch:\n\njobs:\n  release:\n    uses: VirtoCommerce/.github/.github/workflows/release.yml@v3.800.2\n    secrets:\n      envPAT: ${{ secrets.REPO_TOKEN }}\n"
  },
  {
    "path": ".gitignore",
    "content": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User-specific files\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n\n# User-specific files (MonoDevelop/Xamarin Studio)\n*.userprefs\n\n# Build results\n[Dd]ebug/\n[Dd]ebugPublic/\n[Rr]elease/\n[Rr]eleases/\nx64/\nx86/\nbld/\n[Bb]in/\n[Oo]bj/\n[Ll]og/\n\n# Visual Studio 2015 cache/options directory\n.vs/\n# Uncomment if you have tasks that create the project's static files in wwwroot\n#wwwroot/\n\n# MSTest test Results\n[Tt]est[Rr]esult*/\n[Bb]uild[Ll]og.*\n\n# NUNIT\n*.VisualState.xml\nTestResult.xml\n\n# Build Results of an ATL Project\n[Dd]ebugPS/\n[Rr]eleasePS/\ndlldata.c\n\n# DNX\nproject.lock.json\nproject.fragment.lock.json\nartifacts/\n\n*_i.c\n*_p.c\n*_i.h\n*.ilk\n*.meta\n*.obj\n*.pch\n*.pdb\n*.pgc\n*.pgd\n*.rsp\n*.sbr\n*.tlb\n*.tli\n*.tlh\n*.tmp\n*.tmp_proj\n*.log\n*.vspscc\n*.vssscc\n.builds\n*.pidb\n*.svclog\n*.scc\n\n# Chutzpah Test files\n_Chutzpah*\n\n# Visual C++ cache files\nipch/\n*.aps\n*.ncb\n*.opendb\n*.opensdf\n*.sdf\n*.cachefile\n*.VC.db\n*.VC.VC.opendb\n\n# Visual Studio profiler\n*.psess\n*.vsp\n*.vspx\n*.sap\n\n# TFS 2012 Local Workspace\n$tf/\n\n# Guidance Automation Toolkit\n*.gpState\n\n# ReSharper is a .NET coding add-in\n_ReSharper*/\n*.[Rr]e[Ss]harper\n*.DotSettings.user\n\n# JustCode is a .NET coding add-in\n.JustCode\n\n# TeamCity is a build add-in\n_TeamCity*\n\n# DotCover is a Code Coverage Tool\n*.dotCover\n\n# Visual Studio code coverage results\n*.coverage\n*.coveragexml\n\n# NCrunch\n_NCrunch_*\n.*crunch*.local.xml\nnCrunchTemp_*\n\n# MightyMoose\n*.mm.*\nAutoTest.Net/\n\n# Web workbench (sass)\n.sass-cache/\n\n# Installshield output folder\n[Ee]xpress/\n\n# DocProject is a documentation generator add-in\nDocProject/buildhelp/\nDocProject/Help/*.HxT\nDocProject/Help/*.HxC\nDocProject/Help/*.hhc\nDocProject/Help/*.hhk\nDocProject/Help/*.hhp\nDocProject/Help/Html2\nDocProject/Help/html\n\n# Click-Once directory\npublish/\n\n# Publish Web Output\n*.[Pp]ublish.xml\n*.azurePubxml\n# TODO: Comment the next line if you want to checkin your web deploy settings\n# but database connection strings (with potential passwords) will be unencrypted\n*.pubxml\n*.publishproj\n\n# Microsoft Azure Web App publish settings. Comment the next line if you want to\n# checkin your Azure Web App publish settings, but sensitive information contained\n# in these scripts will be unencrypted\nPublishScripts/\n\n# NuGet Packages\n*.nupkg\n# The packages folder can be ignored because of Package Restore\n**/packages/*\n# except build/, which is used as an MSBuild target.\n!**/packages/build/\n# Uncomment if necessary however generally it will be regenerated when needed\n#!**/packages/repositories.config\n# NuGet v3's project.json files produces more ignoreable files\n*.nuget.props\n*.nuget.targets\n\n# Microsoft Azure Build Output\ncsx/\n*.build.csdef\n\n# Microsoft Azure Emulator\necf/\nrcf/\n\n# Windows Store app package directories and files\nAppPackages/\nBundleArtifacts/\nPackage.StoreAssociation.xml\n_pkginfo.txt\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!*.[Cc]ache/\n\n# Others\nClientBin/\n~$*\n*~\n*.dbmdl\n*.dbproj.schemaview\n*.jfm\n*.pfx\n*.publishsettings\nnode_modules/\norleans.codegen.cs\n\n# Since there are multiple workflows, uncomment next line to ignore bower_components\n# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)\n#bower_components/\n\n# RIA/Silverlight projects\nGenerated_Code/\n\n# Backup & report files from converting an old project file\n# to a newer Visual Studio version. Backup files are not needed,\n# because we have git ;-)\n_UpgradeReport_Files/\nBackup*/\nUpgradeLog*.XML\nUpgradeLog*.htm\n\n# SQL Server files\n*.mdf\n*.ldf\n\n# Business Intelligence projects\n*.rdl.data\n*.bim.layout\n*.bim_*.settings\n\n# Microsoft Fakes\nFakesAssemblies/\n\n# GhostDoc plugin setting file\n*.GhostDoc.xml\n\n# Node.js Tools for Visual Studio\n.ntvs_analysis.dat\n\n# Visual Studio 6 build log\n*.plg\n\n# Visual Studio 6 workspace options file\n*.opt\n\n# Visual Studio LightSwitch build output\n**/*.HTMLClient/GeneratedArtifacts\n**/*.DesktopClient/GeneratedArtifacts\n**/*.DesktopClient/ModelManifest.xml\n**/*.Server/GeneratedArtifacts\n**/*.Server/ModelManifest.xml\n_Pvt_Extensions\n\n# Paket dependency manager\n.paket/paket.exe\npaket-files/\n\n# FAKE - F# Make\n.fake/\n\n# JetBrains Rider\n.idea/\n*.sln.iml\n\n# CodeRush\n.cr/\n\n# Python Tools for Visual Studio (PTVS)\n__pycache__/\n*.pyc\n\n# Cake - Uncomment if you are using it\n# tools/\n/VirtoCommerce.Storefront/wwwroot/cms-content\n.vscode\n\nVirtoCommerce.Storefront/wwwroot/js/designer.bundle.js*\n"
  },
  {
    "path": ".nuke",
    "content": "VirtoCommerce.Storefront.sln"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "Contributing\n-----------\nWe welcome & recognize contributors to Virto Commerce. There are many benefits available for our contributers, from special licensing to project involvement and access to private repositories. Follow the guide below to contribute:\n\n1. Before starting work on a new contribution, take a moment and search the commits and issues for similar proposals.\n2. Fork the Virto Commerce repository into your account according to <a href=\"https://help.github.com/articles/fork-a-repo/\">GitHub Fork a Repo</a> document.\n3. Make your changes. Use `dev` branch because it contains the latest stable code. We also recommend you test your code before contributing.\n4. Once ready to commit your changes, create a pull request to `dev` branch according to <a href=\"https://help.github.com/articles/creating-a-pull-request/\">GitHub Create a Pull Request</a>.\n5. Once received, the Virto Commerce development team will review your contribution and if approved, will pull your request to the appropriate branch.\n"
  },
  {
    "path": "Directory.Build.props",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project>\n  <!-- These properties will be shared for all projects -->\n  <PropertyGroup>\n    <Product>VirtoCommerce</Product>\n    <Copyright>Copyright © 2011-2024 Virto Commerce. All rights reserved</Copyright>\n    <Authors>VirtoCommerce</Authors>\n  </PropertyGroup>\n  <PropertyGroup>\n    <VersionPrefix>8.3.0</VersionPrefix>\n    <VersionSuffix>\n    </VersionSuffix>\n    <VersionSuffix Condition=\" '$(VersionSuffix)' != '' AND '$(BuildNumber)' != '' \">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>\n  </PropertyGroup>\n</Project>\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) Virto Solutions LTD.  All rights reserved.\n\nLicensed under the Virto Commerce Open Software License (the \"License\"); you\nmay not use this file except in compliance with the License. You may\nobtain a copy of the License at\n\nhttps://virtocommerce.com/open-source-license\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied.\n"
  },
  {
    "path": "README.md",
    "content": "# Virto Commerce Storefront Kit\n\n[![CI status](https://github.com/VirtoCommerce/vc-storefront/workflows/Storefront%20CI/badge.svg?branch=dev)](https://github.com/VirtoCommerce/vc-storefront/actions?query=workflow%3A\"Storefront+CI\") [![Quality gate](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-storefront&metric=alert_status&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-storefront) [![Reliability rating](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-storefront&metric=reliability_rating&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-storefront) [![Security rating](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-storefront&metric=security_rating&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-storefront) [![Sqale rating](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-storefront&metric=sqale_rating&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-storefront) [![Lines of code](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-storefront&branch=dev&metric=ncloc)](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-storefront&branch=dev&metric=ncloc)&emsp;\n\n[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FVirtoCommerce%2Fvc-storefront%2Fmaster%2Fazuredeploy.json)\n\nThe Virto Commerce Storefront Kit is the official online shopping website based on the Virto Commerce Platform, written on ASP.NET 8. The website serves as a client application for the VC Platform and communicates solely through public APIs.\n\nThe Storefront Kit enables the creation of multiple distinct stores (websites) on top of the Virto Commerce Platform. Each store may have its own theme with specific layouts, yet still be based on the same catalog and customer data. This allows for versatile store configurations, such as:\n\n* Different designs for various product categories.\n* Regional-specific sites offering tailored product sets.\n* Integration with multiple touchpoints for a true omnichannel experience.\n\n\n## Key features\n- Launch and host e-commerce themes on top of the Virto Commerce Platform.\n- XAPI Gateway.\n- Caching mechanism.\n- Multi-store support.\n- Multi-theme support.\n- Server-side rendering.\nAnd more.\n\n## Architecture\nFor detailed information about the Virto Storefront Architecture, please refer to our [developer guide](https://docs.virtocommerce.org/storefront/developer-guide/)\n\n## Technologies and frameworks used\n- ASP.NET 8\n- ASP.NET Identity Core\n\n## Setup\nFor detailed setup information, please refer to [Quick Start](https://docs.virtocommerce.org/storefront/developer-guide/getting-started/quickstart-on-windows/) to deploy and run.\n\n\n## Themes\n\n### B2B Theme\n\nView [B2B theme on GitHub](https://github.com/VirtoCommerce/vc-theme-b2b-vue).\n\n![image](https://user-images.githubusercontent.com/7639413/170992875-fbfa2093-ebbf-4404-8140-c952d9f0f0f4.png)\n\n\n### FAQ\n\n#### Running the Storefront only on HTTP schema\n\n- In order to run the platform only at HTTP schema in production mode, it's enough to pass only HTTP URLs in `--urls` argument of the `dotnet` command.\n\n```console\n  dotnet VirtoCommerce.Storefront.dll --urls=http://localhost:5002\n```\n\n#### Running the Platform on HTTPS schema\n\n- Install and trust HTTPS certificate\n\nRun to trust the .NET Core SDK HTTPS development certificate:\n\n```console\n    dotnet dev-certs https --trust\n```\n\nRead more about [enforcing HTTPS in ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-3.0&tabs=visual-studio#trust)\n\n```console\n    dotnet VirtoCommerce.Storefront.dll --urls=https://localhost:4302/\n```\n\n- Trust the .Net Core Development Self-Signed Certificate. More details on trusting the self-signed certificate can be found [here](https://blogs.msdn.microsoft.com/robert_mcmurray/2013/11/15/how-to-trust-the-iis-express-self-signed-certificate/)\n\n#### Forward the scheme for Linux and non-IIS reverse proxies\n\nApps that call UseHttpsRedirection and UseHsts put a site into an infinite loop if deployed to an Azure Linux App Service, Azure Linux virtual machine (VM), Linux container or behind any other reverse proxy besides IIS. TLS is terminated by the reverse proxy, and Kestrel isn't made aware of the correct request scheme. OAuth and OIDC also fail in this configuration because they generate incorrect redirects. UseIISIntegration adds and configures Forwarded Headers Middleware when running behind IIS, but there's no matching automatic configuration for Linux (Apache or Nginx integration).\n\nTo forward the scheme from the proxy in non-IIS scenarios, set `ASPNETCORE_FORWARDEDHEADERS_ENABLED` environment variable to `true`.\n\nFor more details on how it works, see the Microsoft [documentation](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-5.0#forward-the-scheme-for-linux-and-non-iis-reverse-proxies).\n\n## References\n- Virto Commerce Documentation: https://docs.virtocommerce.org\n- Home: https://virtocommerce.com\n- Community: https://www.virtocommerce.org\n- [Download Latest Release](https://github.com/VirtoCommerce/vc-storefront/releases/latest)\n\n\n## License\n\nCopyright (c) Virto Solutions LTD. All rights reserved.\n\nLicensed under the Virto Commerce Open Software License (the \"License\"); you\nmay not use this file except in compliance with the License. You may\nobtain a copy of the License at\n\n<http://virtocommerce.com/opensourcelicense>\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied.\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Converters/CountryConverter.cs",
    "content": "using System.Globalization;\nusing System.Linq;\nusing System.Web;\nusing Newtonsoft.Json;\nusing VirtoCommerce.Storefront.Model;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Converters\n{\n    public static class CountryConverter\n    {\n        public static string ToOptionTag(this Country country)\n        {\n            var regions = \"[]\";\n\n            if (country.Regions != null)\n            {\n                regions = JsonConvert.SerializeObject(country.Regions.Select(r => r.Name));\n            }\n\n            return string.Format(CultureInfo.InvariantCulture, \"<option value=\\\"{0}\\\" data-provinces=\\\"{1}\\\">{0}</option>\",\n                HttpUtility.HtmlAttributeEncode(country.Name),\n                HttpUtility.HtmlAttributeEncode(regions)\n                );\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Exceptions/SaasCompileException.cs",
    "content": "using System;\nusing System.IO;\nusing System.Runtime.Serialization;\n\nnamespace DotLiquid.ViewEngine.Exceptions\n{\n    [Serializable]\n    public class SaasCompileException : Exception\n    {\n        [Obsolete(DiagnosticId = \"SYSLIB0051\")]\n        protected SaasCompileException(SerializationInfo info, StreamingContext context) : base(info, context)\n        {\n            SassLine = info.GetString(\"SassLine\");\n        }\n\n        public override string Message\n        {\n            get\n            {\n                return base.Message + \"\\n\\r\" + this.ToString();\n            }\n        }\n\n        public string SassLine\n        {\n            get;\n            private set;\n        }\n\n        public override string ToString()\n        {\n\n            return String.Format(\"Line: {0}\\n\\rCompiler error: {1}\", SassLine, _innerException != null ? _innerException.ToString() : \"\");\n        }\n\n        private Exception _innerException;\n\n        public SaasCompileException(string filename, string sass, Exception innerException) : base(\"Failed to compile sass file \\\"\" + filename + \"\\\"\")\n        {\n            _innerException = innerException;\n            if (innerException.Message.StartsWith(\"stdin\"))\n            {\n                var lineNumber = Int32.Parse(innerException.Message.Split(':')[1]);\n                this.SassLine = ReadLine(sass, lineNumber);\n            }\n        }\n\n        private static string ReadLine(string text, int lineNumber)\n        {\n            var reader = new StringReader(text);\n\n            string line;\n            int currentLineNumber = 0;\n\n            do\n            {\n                currentLineNumber += 1;\n                line = reader.ReadLine();\n            }\n            while (line != null && currentLineNumber < lineNumber);\n\n            return (currentLineNumber == lineNumber) ? line : string.Empty;\n        }\n\n        [Obsolete(DiagnosticId = \"SYSLIB0051\")]\n        public override void GetObjectData(SerializationInfo info, StreamingContext context)\n        {\n            base.GetObjectData(info, context);\n\n            info.AddValue(\"SassLine\", SassLine);\n        }\n    }\n\n\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Extensions/GraphQLResponseExtensions.cs",
    "content": "using System;\nusing GraphQL;\nusing Newtonsoft.Json;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Exceptions;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Extensions\n{\n    public static class GraphQLResponseExtensions\n    {\n        public static void ThrowIfHasErrors(this IGraphQLResponse response)\n        {\n            if (response == null)\n            {\n                throw new ArgumentNullException(nameof(response));\n            }\n\n            if (!response.Errors.IsNullOrEmpty())\n            {\n                throw new StorefrontException(JsonConvert.SerializeObject(response.Errors, Formatting.Indented));\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Extensions/StringExtensions.cs",
    "content": "using System.Globalization;\n\nnamespace DotLiquid.ViewEngine.Extensions\n{\n    public static class StringExtensions\n    {\n        public static string TrimQuotes(this string input)\n        {\n            return input.Trim('\\'', '\\\"');\n        }\n\n        public static CultureInfo TryGetCultureInfo(this string languageCode)\n        {\n            try\n            {\n                return !string.IsNullOrEmpty(languageCode) ? CultureInfo.CreateSpecificCulture(languageCode) : null;\n            }\n            catch\n            {\n                return null;\n            }\n        }\n\n        public static int SafeParseInt(this string input, int defaultValue = default)\n        {\n            return int.TryParse(input, out var result) ? result : defaultValue;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Extensions/UriExtensions.cs",
    "content": "using System;\nusing System.Linq;\nusing System.Web;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Extensions\n{\n    public static class UriExtensions\n    {\n        /// <summary>\n        /// Sets the given parameter value in the query string.\n        /// </summary>\n        /// <param name=\"url\"></param>\n        /// <param name=\"name\">Name of the parameter to set.</param>\n        /// <param name=\"value\">Value for the parameter to set. Pass null to remove the parameter with given name.</param>\n        /// <returns>Url with given parameter value.</returns>\n        public static Uri SetQueryParameter(this Uri url, string name, string value)\n        {\n            var qs = HttpUtility.ParseQueryString(url.Query);\n\n            if (value != null)\n            {\n                qs[name] = value;\n            }\n            else\n            {\n                qs.Remove(name);\n            }\n\n            var result = new UriBuilder(url)\n            {\n                Query = string.Join(\"&\", qs.AllKeys.Select(key => string.Join(\"=\", HttpUtility.UrlEncode(key), HttpUtility.UrlEncode(qs[key]))))\n            };\n\n            return result.Uri;\n        }\n\n        public static Uri SetQueryParameters(this Uri uri, IHasQueryKeyValues hasQueryKeyValues)\n        {\n            if (uri == null)\n            {\n                throw new ArgumentNullException(nameof(uri));\n            }\n            if (hasQueryKeyValues == null)\n            {\n                throw new ArgumentNullException(nameof(hasQueryKeyValues));\n            }\n\n            foreach (var keyValue in hasQueryKeyValues.GetQueryKeyValues())\n            {\n                uri = uri.SetQueryParameter(keyValue.Key, keyValue.Value);\n            }\n            return uri;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Filters/ArrayFilters.cs",
    "content": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Reflection;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Filters\n{\n    public static partial class ArrayFilters\n    {\n        public static object Tree(object input, string propName, string titlePropName, string delimiter, string sortByPropName)\n        {\n            var tree = new List<TreeNode>();\n\n            var enumerable = input as IEnumerable;\n            if (enumerable != null)\n            {\n                var elementType = enumerable.GetType().GetEnumerableType();\n                var propInfo = elementType.GetProperty(propName, BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance);\n                var titlePropInfo = elementType.GetProperty(titlePropName, BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance);\n                var sortByPropInfo = elementType.GetProperty(sortByPropName, BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance);\n                if (propInfo != null)\n                {\n                    var charDelimiter = delimiter.ToCharArray();\n\n                    foreach (var element in enumerable)\n                    {\n                        var path = propInfo.GetValue(element) as string;\n                        var parts = path.Split(charDelimiter);\n                        for (var i = parts.Length; i > 0; i--)\n                        {\n                            path = string.Join(delimiter, parts.Take(i));\n                            var treeNode = tree.FirstOrDefault(n => n.Path == path);\n                            if (treeNode == null)\n                            {\n                                tree.Add(new TreeNode\n                                {\n                                    Level = i,\n                                    ParentPath = string.Join(delimiter, parts.Take(Math.Max(0, i - 1))),\n                                    Path = path,\n                                    Priority = sortByPropInfo != null ? sortByPropInfo.GetValue(element) as int? : null,\n                                    Title = titlePropInfo != null ? titlePropInfo.GetValue(element) as string : null\n                                });\n                            }\n                        }\n                    }\n\n                    foreach (var treeNode in tree.OrderBy(n => n.Priority))\n                    {\n                        if (!string.IsNullOrEmpty(treeNode.ParentPath))\n                        {\n                            var parent = tree.FirstOrDefault(n => n.Path == treeNode.ParentPath);\n                            if (parent != null)\n                            {\n                                treeNode.Parent = parent;\n                                parent.Children.Add(treeNode);\n                            }\n                        }\n\n                        treeNode.AllChildren = tree.Where(n => n.Path.StartsWith(treeNode.Path + delimiter)).ToList();\n                    }\n                }\n            }\n\n            return tree;\n        }\n\n        /// <summary>\n        /// Filter the elements of an array by a given condition\n        /// {% assign sorted = pages | where:\"propName\",\"==\",\"value\" %}\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"sort\"></param>\n        /// <returns></returns>\n        public static object Where(object input, string propName, string op, string value)\n        {\n            var retVal = input;\n            var enumerable = retVal as IEnumerable;\n            if (enumerable != null)\n            {\n                var queryable = enumerable.AsQueryable();\n                var elementType = enumerable.GetType().GetEnumerableType();\n\n                var paramX = Expression.Parameter(elementType, \"x\");\n                var propInfo = elementType.GetProperty(propName, BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance);\n                var left = Expression.Property(paramX, propInfo);\n                var objValue = ParseString(value);\n                var right = Expression.Constant(objValue);\n                BinaryExpression binaryOp;\n\n                if (op.EqualsInvariant(\"==\"))\n                    binaryOp = Expression.Equal(left, right);\n                else if (op.EqualsInvariant(\"!=\"))\n                    binaryOp = Expression.NotEqual(left, right);\n                else if (op.EqualsInvariant(\">\"))\n                    binaryOp = Expression.GreaterThan(left, right);\n                else if (op.EqualsInvariant(\">=\"))\n                    binaryOp = Expression.GreaterThanOrEqual(left, right);\n                else if (op.EqualsInvariant(\"=<\"))\n                    binaryOp = Expression.LessThan(left, right);\n                else if (op.EqualsInvariant(\"contains\"))\n                {\n                    Expression expr = null;\n                    if (propInfo.PropertyType == typeof(string))\n                    {\n                        var containsMethod = typeof(string).GetMethods().First(x => x.Name == \"Contains\");\n                        expr = Expression.Call(left, containsMethod, right);\n                    }\n                    else\n                    {\n                        var containsMethod = typeof(Enumerable).GetMethods().First(x => x.Name == \"Contains\" && x.GetParameters().Count() == 2).MakeGenericMethod(new Type[] { objValue.GetType() });\n                        expr = Expression.Call(containsMethod, left, right);\n                    }\n\n                    //where(x=> x.Tags.Contains(y))\n                    binaryOp = Expression.Equal(expr, Expression.Constant(true));\n                }\n                else\n                    binaryOp = Expression.LessThanOrEqual(left, right);\n\n                var delegateType = typeof(Func<,>).MakeGenericType(elementType, typeof(bool));\n\n                //Construct Func<T, bool> = (x) => x.propName == value expression\n                var lambda = Expression.Lambda(delegateType, binaryOp, paramX);\n\n                //Find Queryable.Where(Expression<Func<TSource, bool>>) method\n                var whereMethod = typeof(Queryable).GetMethods()\n                 .Where(x => x.Name == \"Where\")\n                 .Select(x => new { M = x, P = x.GetParameters() })\n                 .Where(x => x.P.Length == 2\n                             && x.P[0].ParameterType.IsGenericType\n                             && x.P[0].ParameterType.GetGenericTypeDefinition() == typeof(IQueryable<>)\n                             && x.P[1].ParameterType.IsGenericType\n                             && x.P[1].ParameterType.GetGenericTypeDefinition() == typeof(Expression<>))\n                 .Select(x => new { x.M, A = x.P[1].ParameterType.GetGenericArguments() })\n                 .Where(x => x.A[0].IsGenericType\n                             && x.A[0].GetGenericTypeDefinition() == typeof(Func<,>))\n                 .Select(x => new { x.M, A = x.A[0].GetGenericArguments() })\n                 .Where(x => x.A[0].IsGenericParameter\n                             && x.A[1] == typeof(bool))\n                 .Select(x => x.M)\n                 .SingleOrDefault();\n\n                retVal = whereMethod.MakeGenericMethod(elementType).Invoke(null, new object[] { queryable, lambda });\n\n            }\n\n            return retVal;\n        }\n\n        /// <summary>\n        /// Sorts the elements of an array by a given attribute of an element in the array.\n        /// {% assign sorted = pages | sort:\"date:desc;name\" %}\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"sort\"></param>\n        /// <returns></returns>\n        public static object SortList(object input, string sort)\n        {\n            var retVal = input;\n            IEnumerable enumerable = retVal as IEnumerable;\n            IMutablePagedList muttablePagedList = input as IMutablePagedList;\n\n            var sortInfos = SortInfo.Parse(sort).ToList();\n            if (muttablePagedList != null)\n            {\n                muttablePagedList.Slice(muttablePagedList.PageNumber, muttablePagedList.PageSize, sortInfos);\n            }\n            if (enumerable != null)\n            {\n                //Queryable.Cast<T>(input).OrderBySortInfos(sortInfos) call by reflection\n                var queryable = enumerable.AsQueryable();\n                var elementType = enumerable.GetType().GetEnumerableType();\n                MethodInfo castMethodInfo = typeof(Queryable).GetMethods().First(x => x.Name == \"Cast\" && x.IsGenericMethod);\n                castMethodInfo = castMethodInfo.MakeGenericMethod(new Type[] { elementType });\n\n                var genericQueryable = castMethodInfo.Invoke(null, new object[] { queryable });\n\n                var orderBySortInfosMethodInfo = typeof(IQueryableExtensions).GetMethod(\"OrderBySortInfos\");\n                orderBySortInfosMethodInfo = orderBySortInfosMethodInfo.MakeGenericMethod(new Type[] { elementType });\n                retVal = orderBySortInfosMethodInfo.Invoke(null, new object[] { genericQueryable, sortInfos.ToArray() });\n            }\n\n            return retVal;\n        }\n\n        private static object ParseString(string str)\n        {\n            int intValue;\n            double doubleValue;\n            char charValue;\n            bool boolValue;\n            TimeSpan timespan;\n            DateTime dateTime;\n\n            // Place checks higher if if-else statement to give higher priority to type.\n            if (int.TryParse(str, out intValue))\n                return intValue;\n            else if (double.TryParse(str, out doubleValue))\n                return doubleValue;\n            else if (TimeSpan.TryParse(str, out timespan))\n                return timespan;\n            else if (DateTime.TryParse(str, out dateTime))\n                return dateTime;\n            else if (char.TryParse(str, out charValue))\n                return charValue;\n            else if (bool.TryParse(str, out boolValue))\n                return boolValue;\n\n            return str;\n        }\n    }\n\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Filters/CommerceFilters.cs",
    "content": "using System;\nusing System.Globalization;\nusing System.Linq;\nusing System.Threading;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Filters\n{\n    public static partial class CommerceFilters\n    {\n        #region Static Fields\n        private static readonly Lazy<CultureInfo[]> _cultures = new Lazy<CultureInfo[]>(\n            CreateCultures,\n            LazyThreadSafetyMode.ExecutionAndPublication);\n        #endregion\n\n        #region Public Properties\n        public static CultureInfo[] Cultures\n        {\n            get\n            {\n                return _cultures.Value;\n            }\n        }\n        #endregion\n\n        #region Public Methods and Operators\n        /// <summary>\n        ///     Return the three letter ISO currency code for the current thread.\n        /// </summary>\n        /// <returns>current currency code in String</returns>\n        public static string CurrentCurrencyCode()\n        {\n            return new RegionInfo(Thread.CurrentThread.CurrentCulture.Name).ISOCurrencySymbol;\n        }\n\n        public static string CurrentCurrencyCode(string cultureName)\n        {\n            return new RegionInfo(cultureName).ISOCurrencySymbol;\n        }\n\n\n        /// <summary>\n        ///     Return the object which represents the place and language which matches the currency code which\n        ///     the database is able to support.  Fall back to Current Thread's culture if the currencyCode we requested doesn't\n        ///     match.\n        /// </summary>\n        /// <param name=\"currencyCode\">the currency code to be matched for the culture</param>\n        /// >\n        /// <returns>CultureInfo object</returns>\n        public static CultureInfo EffectiveCulture(string currencyCode)\n        {\n            var retVal = CultureInfo.CurrentCulture;\n\n            if (!CurrentCurrencyCode().Equals(currencyCode, StringComparison.OrdinalIgnoreCase))\n            {\n                // Find currency culture\n                var info =\n                    Cultures.FirstOrDefault(\n                        i =>\n                            new RegionInfo(i.Name).ISOCurrencySymbol.Equals(\n                                currencyCode,\n                                StringComparison.OrdinalIgnoreCase));\n                retVal = info ?? retVal;\n            }\n\n            //.NET for swiss currency returns Fr where normally it should be CHF\n            if (retVal.Name.Equals(\"de-CH\", StringComparison.InvariantCultureIgnoreCase))\n            {\n                retVal.NumberFormat.CurrencySymbol = \"CHF\";\n            }\n\n            return retVal;\n        }\n\n        /// <summary>\n        ///     Attempt to format the currency based on the browser's locale, but if that currency\n        ///     is not in the database, then fallback to current thread's culture.\n        /// </summary>\n        /// <param name=\"amount\">the amount to be formated</param>\n        /// <param name=\"currencyCode\">\n        ///     currency code which will be used to find the\n        ///     effective culture\n        /// </param>\n        /// <returns>Formatted currency in String</returns>\n        public static string FormatCurrency(decimal amount, string currencyCode)\n        {\n            return string.Format(EffectiveCulture(currencyCode), \"{0:c}\", amount);\n        }\n\n\n        #endregion\n\n        #region Methods\n        private static CultureInfo[] CreateCultures()\n        {\n            return CultureInfo.GetCultures(CultureTypes.SpecificCultures);\n        }\n        #endregion\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Filters/CommonFilters.cs",
    "content": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Collections.Specialized;\nusing System.IO;\nusing System.Linq;\nusing System.Text.Encodings.Web;\nusing DotLiquid.ViewEngine.Extensions;\nusing Microsoft.AspNetCore.Antiforgery;\nusing Microsoft.AspNetCore.Mvc.ViewFeatures;\nusing Microsoft.Extensions.DependencyInjection;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Serialization;\nusing PagedList.Core;\nusing Scriban;\nusing Scriban.Runtime;\nusing Scriban.Syntax;\nusing VirtoCommerce.LiquidThemeEngine.Extensions;\nusing VirtoCommerce.LiquidThemeEngine.JsonConverters;\nusing VirtoCommerce.LiquidThemeEngine.Objects;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Filters\n{\n    public static partial class CommonFilters\n    {\n        private static readonly string[] _poweredLinks = {\n            \"<a href=\\\"http://virtocommerce.com\\\" rel=\\\"nofollow\\\" target=\\\"_blank\\\">.NET ecommerce platform</a> by Virto\",\n            \"<a href=\\\"http://virtocommerce.com/shopping-cart\\\" rel=\\\"nofollow\\\" target=\\\"_blank\\\">Shopping Cart</a> by Virto\",\n            \"<a href=\\\"http://virtocommerce.com/shopping-cart\\\" rel=\\\"nofollow\\\" target=\\\"_blank\\\">.NET Shopping Cart</a> by Virto\",\n            \"<a href=\\\"http://virtocommerce.com/shopping-cart\\\" rel=\\\"nofollow\\\" target=\\\"_blank\\\">ASP.NET Shopping Cart</a> by Virto\",\n            \"<a href=\\\"http://virtocommerce.com\\\" rel=\\\"nofollow\\\" target=\\\"_blank\\\">.NET ecommerce</a> by Virto\",\n            \"<a href=\\\"http://virtocommerce.com\\\" rel=\\\"nofollow\\\" target=\\\"_blank\\\">.NET ecommerce framework</a> by Virto\",\n            \"<a href=\\\"http://virtocommerce.com\\\" rel=\\\"nofollow\\\" target=\\\"_blank\\\">ASP.NET ecommerce</a> by Virto Commerce\",\n            \"<a href=\\\"http://virtocommerce.com\\\" rel=\\\"nofollow\\\" target=\\\"_blank\\\">ASP.NET ecommerce platform</a> by Virto\",\n            \"<a href=\\\"http://virtocommerce.com\\\" rel=\\\"nofollow\\\" target=\\\"_blank\\\">ASP.NET ecommerce framework</a> by Virto\",\n            \"<a href=\\\"http://virtocommerce.com\\\" rel=\\\"nofollow\\\" target=\\\"_blank\\\">Enterprise ecommerce</a> by Virto\",\n            \"<a href=\\\"http://virtocommerce.com\\\" rel=\\\"nofollow\\\" target=\\\"_blank\\\">Enterprise ecommerce platform</a> by Virto\",\n        };\n\n        private static readonly JsonSerializerSettings _jsonSerializerSettings = new JsonSerializerSettings\n        {\n            ReferenceLoopHandling = ReferenceLoopHandling.Ignore,\n            ContractResolver = new DefaultContractResolver\n            {\n                NamingStrategy = new CamelCaseNamingStrategy(),\n            },\n            Converters = new List<JsonConverter>\n            {\n                new MutablePagedListAsArrayJsonConverter(),\n            },\n        };\n\n        public static object Default(object input, object value)\n        {\n            return input ?? value;\n        }\n\n        public static string Json(object input)\n        {\n            var serializedString = input != null ? JsonConvert.SerializeObject(input, _jsonSerializerSettings) : null;\n            return serializedString;\n        }\n\n        public static object ParseJson(string input)\n        {\n            var result = input != null ? JsonConvert.DeserializeObject(input, _jsonSerializerSettings) : null;\n            return result;\n        }\n\n        public static string PoweredBy(string signature)\n        {\n            var hashCode = (uint)signature.GetHashCode();\n            return _poweredLinks[hashCode % _poweredLinks.Length];\n        }\n\n        public static string Render(TemplateContext context, string input)\n        {\n            if (input == null)\n            {\n                return null;\n            }\n            var themeEngine = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n            var result = themeEngine.RenderTemplateAsync(input, null, context.CurrentGlobal).GetAwaiter().GetResult();\n            return result;\n        }\n\n        public static string Antiforgery(TemplateContext context)\n        {\n            var themeEngine = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n            var httpContext = themeEngine.HttpContext;\n            var antiforgery = httpContext.RequestServices.GetService<IAntiforgery>();\n            var htmlContent = antiforgery.GetHtml(httpContext);\n            var writer = new StringWriter();\n            htmlContent.WriteTo(writer, HtmlEncoder.Default);\n            return writer.ToString();\n        }\n\n        public static string Layout(TemplateContext context, string layout)\n        {\n            if (!string.IsNullOrEmpty(layout))\n            {\n                var layoutSetter = (Action<string>)context.GetValue(new ScriptVariableGlobal(\"layout_setter\"));\n                layoutSetter(layout);\n            }\n            return null;\n        }\n\n        public static Paginate Paginate(TemplateContext context, object source, int pageSize = 20, string filterJson = null)\n        {\n            var pagedList = source as IPagedList;\n            var requestUrl = context.GetValue(new ScriptVariableGlobal(\"request_url\")) as Uri;\n            var pageNumber = context.GetValue(new ScriptVariableGlobal(\"page_number\"))?.ToString().SafeParseInt(1) ?? 1;\n            var effectivePageSize = context.GetValue(new ScriptVariableGlobal(\"page_size\"))?.ToString().SafeParseInt(pageSize) ?? pageSize;\n            var @params = new NameValueCollection();\n\n            if (!string.IsNullOrEmpty(filterJson))\n            {\n                var values = JsonConvert.DeserializeObject<Dictionary<string, string>>(filterJson);\n                foreach (var pair in values)\n                {\n                    @params.Add(pair.Key, pair.Value);\n                }\n            }\n\n            switch (source)\n            {\n                case IMutablePagedList mutablePagedList:\n                    mutablePagedList.Slice(pageNumber, effectivePageSize, mutablePagedList.SortInfos, @params);\n                    pagedList = mutablePagedList;\n                    break;\n                case ScriptObject scriptObject when scriptObject.Keys.Contains(\"total_count\"):\n                    pagedList = new StaticPagedList<object>(Array.Empty<object>(), pageNumber, effectivePageSize, scriptObject[\"total_count\"].ToString().SafeParseInt(0));\n                    break;\n                case ICollection collection:\n                    pagedList = new PagedList<object>(collection.OfType<object>().AsQueryable(), pageNumber, effectivePageSize);\n                    break;\n            }\n\n            if (pagedList == null)\n            {\n                return null;\n            }\n\n            var result = new Paginate(pagedList);\n\n            for (var i = 1; i <= pagedList.PageCount; i++)\n            {\n                var page = i > 1 ? i.ToString() : null;\n\n                var part = new Part\n                {\n                    IsLink = i != pagedList.PageNumber,\n                    Title = i.ToString(),\n                    Url = requestUrl != null ? requestUrl.SetQueryParameter(\"page\", page).ToString() : i.ToString()\n                };\n\n                result.Parts.Add(part);\n            }\n\n            return result;\n        }\n\n        public static string Setting(TemplateContext context, string key)\n        {\n            var themeEngine = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n            var settings = themeEngine.GetSettings();\n\n            settings.TryGetValue(key, out var result);\n\n            return result?.ToString();\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Filters/DynamicDataSourceFilters.cs",
    "content": "using System.Collections;\nusing System.Collections.Generic;\nusing System.Dynamic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing GraphQL;\nusing Scriban;\nusing Scriban.Runtime;\nusing VirtoCommerce.LiquidThemeEngine.Extensions;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Filters\n{\n    public static class DataSourceFilter\n    {\n        public static ScriptObject GraphqlDataSource(TemplateContext context, string fileName)\n        {\n            var themeAdaptor = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n            var query = themeAdaptor.GetAssetStreamAsync(Path.Combine(\"graphql\", fileName)).GetAwaiter().GetResult().ReadToString();\n            var graphQLRequest = new GraphQLRequest(query);\n\n            var response = themeAdaptor.GraphQLClient.SendQueryAsync<ExpandoObject>(graphQLRequest).GetAwaiter().GetResult();\n            response.ThrowIfHasErrors();\n            var result = BuildScriptObject(response.Data);\n            return result;\n        }\n\n        private static ScriptObject BuildScriptObject(ExpandoObject expando)\n        {\n            var dict = (IDictionary<string, object>)expando;\n            var scriptObject = new ScriptObject();\n\n            foreach (var kv in dict)\n            {\n                var renamedKey = GraphQLMemberRenamer.Rename(kv.Key);\n\n                if (kv.Value is ExpandoObject expandoValue)\n                {\n                    scriptObject.Add(renamedKey, BuildScriptObject(expandoValue));\n                }\n                else if (kv.Value is IList array)\n                {\n                    var firstValue = array.Count > 0 ? array[0] : null;\n                    if (firstValue is ExpandoObject expandoObj)\n                    {\n                        scriptObject.Add(renamedKey, array.OfType<ExpandoObject>().Select(x => BuildScriptObject(x)).ToArray());\n                    }\n                    else\n                    {\n                        scriptObject.Add(renamedKey, array);\n                    }\n                }\n                else\n                {\n                    scriptObject.Add(renamedKey, kv.Value);\n                }\n            }\n\n            return scriptObject;\n        }\n\n        private class GraphQLMemberRenamer\n        {\n            protected GraphQLMemberRenamer()\n            {\n            }\n            /// <summary>\n            /// Renames a camel/pascalcase member to a lowercase and `_` name. e.g `ThisIsAnExample` becomes `this_is_an_example`.\n            /// </summary>\n            /// <param name=\"member\">The member to rename</param>\n            /// <returns>The member name renamed</returns>\n            public static string Rename(string name)\n            {\n                var builder = new StringBuilder();\n                var previousUpper = false;\n\n                for (var i = 0; i < name.Length; i++)\n                {\n                    var c = name[i];\n                    if (char.IsUpper(c))\n                    {\n                        if (i > 0 && !previousUpper)\n                        {\n                            builder.Append(\"_\");\n                        }\n                        builder.Append(char.ToLowerInvariant(c));\n                        previousUpper = true;\n                    }\n                    else\n                    {\n                        builder.Append(c);\n                        previousUpper = false;\n                    }\n                }\n                return builder.ToString();\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Filters/FeatureFilter.cs",
    "content": "using System.Collections.Generic;\nusing global::Scriban;\nusing Newtonsoft.Json.Linq;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Filters\n{\n    public static class FeatureFilter\n    {\n        public static bool IsFeatureActive(TemplateContext context, string key, params object[] variables)\n        {\n            if (string.IsNullOrEmpty(key))\n            {\n                return false;\n            }\n\n            if (context.TemplateLoader is ShopifyLiquidThemeEngine themeEngine)\n            {\n                return themeEngine.IsFeatureActive(key);\n            }\n\n            return false;\n        }\n\n        public static string IsFeaturesActive(TemplateContext context, string key, params object[] featureNames)\n        {\n            if (!string.IsNullOrEmpty(key))\n            {\n                return string.Empty;\n            }\n\n            switch (context.TemplateLoader)\n            {\n                case ShopifyLiquidThemeEngine themeEngine:\n                    {\n                        var featuresStateJsonObject = BuildFeaturesStateJsonObject(themeEngine, featureNames);\n\n                        return featuresStateJsonObject.ToString();\n                    }\n\n                default:\n                    return string.Empty;\n            }\n        }\n\n        private static JObject BuildFeaturesStateJsonObject(ShopifyLiquidThemeEngine themeEngine, IEnumerable<object> featureNames)\n        {\n            var result = new JObject();\n\n            foreach (string featureName in featureNames)\n            {\n                var featureActive = themeEngine.IsFeatureActive(featureName);\n                result.Add(featureName, featureActive);\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Filters/HtmlFilters.cs",
    "content": "namespace VirtoCommerce.LiquidThemeEngine.Filters\n{\n    /// <summary>\n    /// https://docs.shopify.com/themes/liquid-documentation/filters/html-filters\n    /// </summary>\n    public static partial class HtmlFilters\n    {\n        /// <summary>\n        /// Generates a script tag.\n        /// {{ 'shop.js' | asset_url | script_tag }}\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string ScriptTag(string input)\n        {\n            return string.Format(\"<script src=\\\"{0}\\\"></script>\", input);\n        }\n\n        /// <summary>\n        /// Generates async script tag.\n        /// {{ 'shop.js' | asset_url | script_tag_async }}\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string ScriptTagAsync(string input)\n        {\n            return string.Format(\"<script async src=\\\"{0}\\\"></script>\", input);\n        }\n\n        /// <summary>\n        /// Generates defer script tag.\n        /// {{ 'shop.js' | asset_url | script_tag_defer }}\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string ScriptTagDefer(string input)\n        {\n            return string.Format(\"<script defer src=\\\"{0}\\\"></script>\", input);\n        }\n\n        /// <summary>\n        /// Generates module script tag.\n        /// {{ 'shop.js' | asset_url | script_tag_module }}\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string ScriptTagModule(string input)\n        {\n            return string.Format(\"<script type=\\\"module\\\" crossorigin src=\\\"{0}\\\"></script>\", input);\n        }\n\n        /// <summary>\n        /// Generates a stylesheet tag.\n        /// {{ 'shop.css' | asset_url | stylesheet_tag }}\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"media\"></param>\n        /// <returns></returns>\n        public static string StylesheetTag(string input, string media = \"all\")\n        {\n            return string.Format(\"<link rel=\\\"stylesheet\\\" href=\\\"{0}\\\" media=\\\"{1}\\\">\", input, media);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Filters/MathFilters.cs",
    "content": "using System;\nusing System.Globalization;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Filters\n{\n    public static partial class MathFilters\n    {\n        public static object Round(object input, int digits = 0)\n        {\n            if (input != null)\n            {\n                input = Math.Round(Convert.ToDouble(input, CultureInfo.InvariantCulture), digits);\n            }\n            return input;\n        }\n\n        public static object Ceil(object input)\n        {\n            if (input != null)\n            {\n                input = Math.Ceiling(Convert.ToDouble(input, CultureInfo.InvariantCulture));\n            }\n            return input;\n        }\n\n        public static object Floor(object input)\n        {\n            if (input != null)\n            {\n                input = Math.Floor(Convert.ToDouble(input, CultureInfo.InvariantCulture));\n            }\n            return input;\n        }\n\n        public static object Abs(object input)\n        {\n            if (input != null)\n            {\n                input = Math.Abs(Convert.ToDouble(input, CultureInfo.InvariantCulture));\n            }\n            return input;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Filters/MoneyFilters.cs",
    "content": "using System;\nusing System.Globalization;\nusing Scriban;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Filters\n{\n    /// <summary>\n    /// https://docs.shopify.com/themes/liquid-documentation/filters/money-filters\n    /// </summary>\n    public static partial class MoneyFilters\n    {\n        /// <summary>\n        /// Formats the price based on the shop's HTML without currency setting.\n        /// {{ 145 | money }}\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"currencyCode\"></param>\n        /// <returns></returns>\n        public static string Money(TemplateContext context, object input, string currencyCode = null)\n        {\n            var money = GetMoney(context, input, currencyCode);\n            return money == null ? null : money.ToString();\n        }\n\n        public static string MoneyWithoutDecimalPart(TemplateContext context, object input, string currencyCode = null)\n        {\n            var money = GetMoney(context, input, currencyCode);\n            return money == null ? null : money.FormattedAmountWithoutPoint;\n        }\n\n        public static string MoneyWithCurrency(TemplateContext context, object input, string currencyCode = null)\n        {\n            return Money(context, input, currencyCode);\n        }\n        public static string MoneyWithoutCurrency(TemplateContext context, object input, string currencyCode = null)\n        {\n            var money = GetMoney(context, input, currencyCode);\n            return money == null ? null : money.FormattedAmountWithoutCurrency;\n        }\n        private static Money GetMoney(TemplateContext context, object input, string currencyCode = null)\n        {\n            if (input == null)\n            {\n                return null;\n            }\n            var themeEngine = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n            if (input is Money money)\n            {\n                return money;\n            }\n            else\n            {\n                var amount = Convert.ToDecimal(input, CultureInfo.InvariantCulture);\n                var currency = currencyCode == null ? themeEngine.WorkContext.CurrentCurrency : new Currency(themeEngine.WorkContext.CurrentLanguage, currencyCode);\n                return new Money(amount, currency);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Filters/StandardFilters.cs",
    "content": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Net;\nusing System.Text.RegularExpressions;\nusing System.Xml.XPath;\nusing Scriban;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Filters\n{\n    public static partial class StandardFilters\n    {\n        /// <summary>\n        /// Return the size of an array or of an string\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static int Size(object input)\n        {\n            if (input is string str)\n            {\n                return str.Length;\n            }\n\n            return input is IEnumerable enumerable ? enumerable.Cast<object>().Count() : 0;\n        }\n\n        /// <summary>\n        /// Return a Part of a String\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"start\"></param>\n        /// <param name=\"len\"></param>\n        /// <returns></returns>\n        public static string Slice(string input, int start, int len = 1)\n        {\n            if (input == null || start > input.Length)\n            {\n                return null;\n            }\n\n            if (start < 0)\n            {\n                start += input.Length;\n            }\n\n            if (start + len > input.Length)\n            {\n                len = input.Length - start;\n            }\n\n            return input.Substring(start, len);\n        }\n\n        /// <summary>\n        /// convert a input string to DOWNCASE\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string Downcase(string input)\n        {\n            return input == null ? input : input.ToLower();\n        }\n\n        /// <summary>\n        /// convert a input string to UPCASE\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string Upcase(string input)\n        {\n            return input == null\n                ? input\n                : input.ToUpper();\n        }\n\n        /// <summary>\n        /// capitalize words in the input sentence\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string Capitalize(string input)\n        {\n            if (input.IsNullOrWhiteSpace())\n            {\n                return input;\n            }\n\n            return string.IsNullOrEmpty(input)\n                ? input\n                : CultureInfo.CurrentCulture.TextInfo.ToTitleCase(input);\n        }\n\n        public static string Escape(string input)\n        {\n            if (string.IsNullOrEmpty(input))\n            {\n                return input;\n            }\n\n            try\n            {\n                return WebUtility.HtmlEncode(input);\n            }\n            catch\n            {\n                return input;\n            }\n        }\n\n        public static string H(string input)\n        {\n            return Escape(input);\n        }\n\n        /// <summary>\n        /// Truncates a string down to x characters\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"length\"></param>\n        /// <param name=\"truncateString\"></param>\n        /// <returns></returns>\n        public static string Truncate(string input, int length = 50, string truncateString = \"...\")\n        {\n            if (string.IsNullOrEmpty(input))\n            {\n                return input;\n            }\n\n            var l = length - truncateString.Length;\n\n            var startIndex = l < 0 ? 0 : l;\n\n            return input.Length > length\n                ? input.Substring(0, startIndex) + truncateString\n                : input;\n        }\n\n        public static string Truncatewords(string input, int words = 15, string truncateString = \"...\")\n        {\n            if (string.IsNullOrEmpty(input))\n            {\n                return input;\n            }\n\n            var wordList = input.Split(' ').ToList();\n            var l = words < 0 ? 0 : words;\n\n            return wordList.Count > l\n                ? string.Join(\" \", wordList.Take(l).ToArray()) + truncateString\n                : input;\n        }\n\n        /// <summary>\n        /// Split input string into an array of substrings separated by given pattern.\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"pattern\"></param>\n        /// <returns></returns>\n        public static string[] Split(string input, string pattern)\n        {\n            return input.IsNullOrWhiteSpace()\n                ? new[] { input }\n                : input.Split(new[] { pattern }, StringSplitOptions.RemoveEmptyEntries);\n        }\n\n        public static string StripHtml(object input)\n        {\n            if (input == null)\n            {\n                return string.Empty;\n            }\n\n            var inputString = input.ToString();\n\n            return inputString.IsNullOrWhiteSpace()\n                ? inputString\n                : Regex.Replace(inputString, @\"<.*?>\", string.Empty);\n        }\n\n        /// <summary>\n        /// Remove all newlines from the string\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string StripNewlines(string input)\n        {\n            return input.IsNullOrWhiteSpace()\n                ? input\n                : Regex.Replace(input, @\"(\\r?\\n)\", string.Empty);\n        }\n\n        /// <summary>\n        /// Join elements of the array with a certain character between them\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"glue\"></param>\n        /// <returns></returns>\n        public static string Join(IEnumerable input, string glue = \" \")\n        {\n            if (input == null)\n            {\n                return null;\n            }\n\n            var castInput = input.Cast<object>();\n\n            return string.Join(glue, castInput);\n        }\n\n        /// <summary>\n        /// Sort elements of the array\n        /// provide optional property with which to sort an array of hashes or drops\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"property\"></param>\n        /// <returns></returns>\n        public static IEnumerable Sort(object input, string property = null)\n        {\n            var ary = input is IEnumerable enumerable ? enumerable.Flatten().Cast<object>().ToList() : new List<object>(new[] { input });\n\n            if (!ary.Any())\n            {\n                return ary;\n            }\n\n            if (string.IsNullOrEmpty(property))\n            {\n                ary.Sort();\n            }\n            else if ((ary.All(o => o is IDictionary)) && ((IDictionary)ary.First()).Contains(property))\n            {\n                ary.Sort((a, b) => Comparer.Default.Compare(((IDictionary)a)[property], ((IDictionary)b)[property]));\n            }\n            else if (ary.All(o => o.RespondTo(property)))\n            {\n                ary.Sort((a, b) => Comparer.Default.Compare(a.Send(property), b.Send(property)));\n            }\n\n            return ary;\n        }\n\n        /// <summary>\n        /// Map/collect on a given property\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"property\"></param>\n        /// <returns></returns>\n        public static IEnumerable Map(IEnumerable input, string property)\n        {\n            if (input == null)\n            {\n                return input;\n            }\n\n            var ary = input.Cast<object>().ToList();\n            if (!ary.Any())\n            {\n                return ary;\n            }\n\n            if ((ary.All(o => o is IDictionary)) && ((IDictionary)ary.First()).Contains(property))\n            {\n                return ary.Select(e => ((IDictionary)e)[property]);\n            }\n\n            return ary.All(o => o.RespondTo(property)) ? ary.Select(e => e.Send(property)) : ary;\n        }\n\n        /// <summary>\n        /// Replace occurrences of a string with another\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"string\"></param>\n        /// <param name=\"replacement\"></param>\n        /// <returns></returns>\n        public static string Replace(object input, string @string, string replacement = \"\")\n        {\n            if (input == null)\n            {\n                return null;\n            }\n\n            if (string.IsNullOrEmpty(input.ToString()) || string.IsNullOrEmpty(@string))\n            {\n                return input.ToString();\n            }\n\n            input = input.ToString().Replace(@string, replacement);\n\n            return input.ToString();\n        }\n        /// <summary>\n        /// Replace the first occurence of a string with another\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"string\"></param>\n        /// <param name=\"replacement\"></param>\n        /// <returns></returns>\n        public static string ReplaceFirst(string input, string @string, string replacement = \"\")\n        {\n            if (string.IsNullOrEmpty(input) || string.IsNullOrEmpty(@string))\n            {\n                return input;\n            }\n\n            var doneReplacement = false;\n            return Regex.Replace(input, @string, m =>\n            {\n                if (doneReplacement)\n                {\n                    return m.Value;\n                }\n\n                doneReplacement = true;\n                return replacement;\n            });\n        }\n\n        /// <summary>\n        /// Remove a substring\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"string\"></param>\n        /// <returns></returns>\n        public static string Remove(string input, string @string)\n        {\n            return input.IsNullOrWhiteSpace()\n                ? input\n                : input.Replace(@string, string.Empty);\n        }\n\n        /// <summary>\n        /// Remove the first occurrence of a substring\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"string\"></param>\n        /// <returns></returns>\n        public static string RemoveFirst(string input, string @string)\n        {\n            return input.IsNullOrWhiteSpace()\n                ? input\n                : ReplaceFirst(input, @string, string.Empty);\n        }\n\n        /// <summary>\n        /// Add one string to another\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"string\"></param>\n        /// <returns></returns>\n        public static string Append(object input, object @string)\n        {\n            return input + @string.ToSafeString();\n        }\n\n        /// <summary>\n        /// Prepend a string to another\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"string\"></param>\n        /// <returns></returns>\n        public static string Prepend(object input, object @string)\n        {\n            return @string.ToSafeString() + input;\n        }\n\n        /// <summary>\n        /// Add <br /> tags in front of all newlines in input string\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string NewlineToBr(string input)\n        {\n            return input.IsNullOrWhiteSpace()\n                    ? input\n                    : Regex.Replace(input, @\"(\\r?\\n)\", \"<br />$1\");\n        }\n\n        /// <summary>\n        /// Formats a date using a .NET date format string\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"format\"></param>\n        /// <returns></returns>\n        public static string Date(TemplateContext context, object input, string format)\n        {\n            if (input == null)\n            {\n                return null;\n            }\n\n            if (format.IsNullOrWhiteSpace())\n            {\n                return input.ToString();\n            }\n\n            switch (format)\n            {\n                case \"long\":\n                    format = \"f\";\n                    break;\n            }\n\n            var result = input.ToString();\n            DateTime date;\n            var dateParsed = false;\n\n            if (input.ToString().Equals(\"now\", StringComparison.OrdinalIgnoreCase))\n            {\n                date = DateTime.Now;\n                dateParsed = true;\n            }\n            else if (DateTime.TryParse(input.ToString(), out date))\n            {\n                dateParsed = true;\n            }\n            if (Regex.IsMatch(format, @\"^[\\w\\d_\\-]+$\"))\n            {\n                var key = string.Concat(\"date_formats.\", format);\n                var newFormat = TranslationFilter.T(context, key);\n                if (!newFormat.IsNullOrEmpty() && newFormat != key)\n                {\n                    format = newFormat;\n                }\n            }\n            if (dateParsed)\n            {\n                var themeEngine = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n                TryFormatDateTime(date, format, out result, CultureInfo.GetCultureInfo(themeEngine.WorkContext.CurrentLanguage.CultureName));\n            }\n\n            return result;\n        }\n\n        /// <summary>\n        /// Get the first element of the passed in array \n        /// \n        /// Example:\n        ///   {{ product.images | first | to_img }}\n        /// </summary>\n        /// <param name=\"array\"></param>\n        /// <returns></returns>\n        public static object First(IEnumerable array)\n        {\n            return array?.Cast<object>().FirstOrDefault();\n        }\n\n        /// <summary>\n        /// Get the last element of the passed in array \n        /// \n        /// Example:\n        ///   {{ product.images | last | to_img }}\n        /// </summary>\n        /// <param name=\"array\"></param>\n        /// <returns></returns>\n        public static object Last(IEnumerable array)\n        {\n            return array?.Cast<object>().LastOrDefault();\n        }\n\n        /// <summary>\n        /// Addition\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"operand\"></param>\n        /// <returns></returns>\n        public static object Plus(object input, object operand)\n        {\n\n            return DoMathsOperation(input, operand, Expression.Add);\n        }\n\n        /// <summary>\n        /// Subtraction\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"operand\"></param>\n        /// <returns></returns>\n        public static object Minus(object input, object operand)\n        {\n            return DoMathsOperation(input, operand, Expression.Subtract);\n        }\n\n        /// <summary>\n        /// Multiplication\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"operand\"></param>\n        /// <returns></returns>\n        public static object Times(object input, object operand)\n        {\n\n            return DoMathsOperation(input, operand, Expression.Multiply);\n\n        }\n\n        /// <summary>\n        /// Division\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"operand\"></param>\n        /// <returns></returns>\n        public static object DividedBy(object input, object operand)\n        {\n            return DoMathsOperation(input, operand, Expression.Divide);\n        }\n\n        public static object Modulo(object input, object operand)\n        {\n            return DoMathsOperation(input, operand, Expression.Modulo);\n        }\n\n        private static object DoMathsOperation(object input, object operand, Func<Expression, Expression, BinaryExpression> operation)\n        {\n            input = input.ToNumber();\n            operand = operand.ToNumber();\n\n            return input == null || operand == null\n                ? null\n                : ExpressionUtility.CreateExpression(operation, input.GetType(), operand.GetType(), input.GetType(), true)\n                    .DynamicInvoke(input, operand);\n        }\n\n        private static void TryFormatDateTime(DateTime input, string format, out string formated, IFormatProvider formatProvider = null)\n        {\n            if (format == null)\n            {\n                throw new ArgumentNullException(nameof(input));\n            }\n\n            formated = null;\n\n            try\n            {\n                formated = input.ToString(format, formatProvider);\n            }\n            catch\n            {\n                //Swallow any exception \n            }\n        }\n    }\n\n    /// <summary>\n    /// Some of this code was taken from http://www.yoda.arachsys.com/csharp/miscutil/usage/genericoperators.html.\n    /// General purpose Expression utilities\n    /// </summary>\n    internal static class ExpressionUtility\n    {\n        /// <summary>\n        /// Create a function delegate representing a binary operation\n        /// </summary>\n        /// <param name=\"body\">Body factory</param>\n        /// <param name=\"leftType\"></param>\n        /// <param name=\"rightType\"></param>\n        /// <param name=\"resultType\"></param>\n        /// <param name=\"castArgsToResultOnFailure\">\n        /// If no matching operation is possible, attempt to convert\n        /// TArg1 and TArg2 to TResult for a match? For example, there is no\n        /// \"decimal operator /(decimal, int)\", but by converting TArg2 (int) to\n        /// TResult (decimal) a match is found.\n        /// </param>\n        /// <returns>Compiled function delegate</returns>\n        public static Delegate CreateExpression(Func<Expression, Expression, BinaryExpression> body,\n            Type leftType, Type rightType, Type resultType, bool castArgsToResultOnFailure)\n        {\n            var lhs = Expression.Parameter(leftType, \"lhs\");\n            var rhs = Expression.Parameter(rightType, \"rhs\");\n\n            Expression lhsExpression = lhs;\n            Expression rhsExpression = rhs;\n            UpdateVisit(ref lhsExpression, ref rhsExpression);\n            try\n            {\n                try\n                {\n\n                    return Expression.Lambda(body(lhsExpression, rhsExpression), lhs, rhs).Compile();\n                }\n                catch (InvalidOperationException)\n                {\n                    if (castArgsToResultOnFailure && !( // if we show retry                                                        \n                        leftType == resultType && // and the args aren't\n                            rightType == resultType))\n                    {\n                        // already \"TValue, TValue, TValue\"...\n                        // convert both lhs and rhs to TResult (as appropriate)\n                        var castLhs = leftType == resultType ? lhs : (Expression)Expression.Convert(lhs, resultType);\n                        var castRhs = rightType == resultType ? rhs : (Expression)Expression.Convert(rhs, resultType);\n\n                        return Expression.Lambda(body(castLhs, castRhs), lhs, rhs).Compile();\n                    }\n                    throw;\n                }\n            }\n            catch (Exception ex)\n            {\n                var msg = ex.Message; // avoid capture of ex itself\n                return (Action)(delegate\n                { throw new InvalidOperationException(msg); });\n            }\n        }\n\n        private static void UpdateVisit(ref Expression left, ref Expression right)\n        {\n            var leftTypeCode = Type.GetTypeCode(left.Type);\n            var rightTypeCode = Type.GetTypeCode(right.Type);\n\n            if (leftTypeCode == rightTypeCode)\n            {\n                return;\n            }\n\n            if (leftTypeCode > rightTypeCode && leftTypeCode != TypeCode.String)\n            {\n                right = Expression.Convert(right, left.Type);\n            }\n            else\n            {\n                left = Expression.Convert(left, right.Type);\n            }\n        }\n    }\n\n    internal static class ObjectExtensionMethods\n    {\n        public static bool RespondTo(this object value, string member, bool ensureNoParameters = true)\n        {\n            if (value == null)\n            {\n                throw new ArgumentNullException(\"value\");\n            }\n\n            var type = value.GetType();\n\n            var methodInfo = type.GetMethod(member);\n            if (methodInfo != null && (!ensureNoParameters || !methodInfo.GetParameters().Any()))\n            {\n                return true;\n            }\n\n            var propertyInfo = type.GetProperty(member);\n            return propertyInfo != null && propertyInfo.CanRead;\n        }\n\n        public static object Send(this object value, string member, object[] parameters = null)\n        {\n            if (value == null)\n            {\n                throw new ArgumentNullException(\"value\");\n            }\n\n            var type = value.GetType();\n\n            var methodInfo = type.GetMethod(member);\n            if (methodInfo != null)\n            {\n                return methodInfo.Invoke(value, parameters);\n            }\n\n            var propertyInfo = type.GetProperty(member);\n            return propertyInfo?.GetValue(value, null);\n        }\n    }\n\n    internal static class StringExtensions\n    {\n        public static bool IsNullOrWhiteSpace(this string s)\n        {\n            return string.IsNullOrEmpty(s) || s.Trim().Length == 0;\n        }\n\n        public static string ToSafeString(this object s)\n        {\n            return s == null ? \"\" : s.ToString();\n        }\n\n        public static object ToNumber(this object s)\n        {\n            if (s is double)\n            {\n                return s;\n            }\n            else if (s is float)\n            {\n                return s;\n            }\n            else if (s is decimal)\n            {\n                return s;\n            }\n            else if (s is int)\n            {\n                return s;\n            }\n            else if (s is Money money)\n            {\n                return money.Amount;\n            }\n            else if (s is string)\n            {\n                var match = Regex.Match(s as string, string.Format(\"(?-mix:{0})\", @\"^([+-]?\\d[\\d\\.|\\,]+)$\"));\n                if (match.Success)\n                {\n                    // For cultures with \",\" as the decimal separator, allow\n                    // both \",\" and \".\" to be used as the separator.\n                    // First try to parse using current culture.\n\n                    if (float.TryParse(match.Groups[1].Value, out var result))\n                    {\n                        return result;\n                    }\n\n                    // If that fails, try to parse using invariant culture.\n                    return float.Parse(match.Groups[1].Value, CultureInfo.InvariantCulture);\n                }\n\n                match = Regex.Match(s as string, string.Format(\"(?-mix:{0})\", @\"^([+-]?\\d+).*$\"));\n                if (match.Success)\n                {\n                    return Convert.ToInt32(match.Groups[1].Value);\n                }\n            }\n\n            return 0;\n        }\n\n        private static double Evaluate(string expression)\n        {\n            var xsltExpression =\n                string.Format(\"number({0})\",\n                    new Regex(@\"([\\+\\-\\*])\").Replace(expression, \" ${1} \")\n                                            .Replace(\"/\", \" div \")\n                                            .Replace(\"%\", \" mod \"));\n\n            return (double)new XPathDocument\n                (new StringReader(\"<r/>\"))\n                    .CreateNavigator()\n                    .Evaluate(xsltExpression);\n        }\n    }\n\n    internal static class EnumerableExtensionMethods\n    {\n        public static IEnumerable Flatten(this IEnumerable array)\n        {\n            foreach (var item in array)\n            {\n                if (item is string)\n                {\n                    yield return item;\n                }\n                else if (item is IEnumerable enumerableItem)\n                {\n                    foreach (var subItem in Flatten(enumerableItem))\n                    {\n                        yield return subItem;\n                    }\n                }\n                else\n                {\n                    yield return item;\n                }\n            }\n        }\n\n        public static void EachWithIndex(this IEnumerable<object> array, Action<object, int> callback)\n        {\n            var index = 0;\n\n            foreach (var item in array)\n            {\n                callback(item, index);\n                ++index;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Filters/StringFilters.cs",
    "content": "using System.Security.Cryptography;\nusing System.Text;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Filters\n{\n    /// <summary>\n    /// String filters are used to manipulate outputs and variables of the string type.\n    /// https://docs.shopify.com/themes/liquid-documentation/filters/string-filters\n    /// </summary>\n    public static partial class StringFilters\n    {\n\n        /// <summary>\n        /// Converts a string into CamelCase.\n        /// {{ 'coming-soon' | camelcase }}\n        /// Result - ComingSoon\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string Camelize(string input)\n        {\n            if (string.IsNullOrEmpty(input))\n            {\n                return input;\n            }\n\n            var result = new StringBuilder();\n\n            var strArray = input.Split(separator: '_', '-');\n            foreach (var word in strArray)\n            {\n                result.Append(word.Substring(0, 1).ToUpper() + word.Substring(1));\n            }\n\n            return result.ToString();\n        }\n\n        public static string Handle(string input)\n        {\n            return Handleize(input);\n        }\n\n\n        /// <summary>\n        /// Formats a string into a handle.\n        /// Input\n        ///{{ '100% M & Ms!!!' | handleize }}\n        /// Output\n        /// 100-m-ms\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string Handleize(string input)\n        {\n            if (string.IsNullOrEmpty(input))\n            {\n                return input;\n            }\n\n            return input.Handelize();\n        }\n\n        /// <summary>\n        /// Converts a string into an MD5 hash.\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string Md5(string input)\n        {\n            if (string.IsNullOrEmpty(input))\n            {\n                return input;\n            }\n\n            byte[] hash;\n            using (var md5 = MD5.Create())\n            {\n                hash = md5.ComputeHash(Encoding.UTF8.GetBytes(input));\n            }\n\n            return hash.ToHex(upperCase: false);\n        }\n\n        /// <summary>\n        /// Outputs the singular or plural version of a string based on the value of a number. The first parameter is the singular string and the second parameter is the plural string.\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"singular\"></param>\n        /// <param name=\"plural\"></param>\n        /// <returns></returns>\n        public static string Pluralize(int input, string singular, string plural)\n        {\n            return input == 1 ? singular : plural;\n        }\n\n\n        /// <summary>\n        /// Strips tabs, spaces, and newlines (all whitespace) from the left and right side of a string.\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string Strip(string input)\n        {\n            if (string.IsNullOrEmpty(input))\n            {\n                return input;\n            }\n\n            return input.Trim();\n        }\n\n        public static string Format(object input, string format)\n        {\n            if (input == null)\n                return null;\n            else if (string.IsNullOrWhiteSpace(format))\n                return input.ToString();\n\n            return string.Format(\"{0:\" + format + \"}\", input);\n        }\n\n    }\n\n\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Filters/TranslationFilter.cs",
    "content": "using Scriban;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Filters\n{\n    /// <summary>\n    /// Filter used for localization \n    /// </summary>\n    public static partial class TranslationFilter\n    {\n        public static string T(TemplateContext context, string key, params object[] variables)\n        {\n            var result = key;\n            var themeAdaptor = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n            var localization = themeAdaptor.ReadLocalization();\n\n            if (localization != null)\n            {\n                //Backward compatibility \"\" | t returns entire localization JSON\n                if (string.IsNullOrEmpty(key))\n                {\n                    result = localization.ToString();\n                }\n                else if (key.IsValidJsonPath())\n                {\n                    result = (localization.SelectToken(key, errorWhenNoMatch: false) ?? key).ToString();\n                    if (!variables.IsNullOrEmpty())\n                    {\n                        result = string.Format(result, variables);\n                    }\n                }\n            }\n\n            return result;\n        }\n    }\n\n\n\n\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Filters/UrlFilters.cs",
    "content": "using System;\nusing System.Linq;\nusing Scriban;\nusing VirtoCommerce.LiquidThemeEngine.Extensions;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Stores;\nusing storefrontModel = VirtoCommerce.Storefront.Model;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Filters\n{\n    /// <summary>\n    /// https://docs.shopify.com/themes/liquid-documentation/filters/url-filters\n    /// </summary>\n    public static partial class UrlFilters\n    {\n        public static string SizeImageLink(string input, string size)\n        {\n            if (input != null)\n            {\n                input = input.AddSuffixToFileUrl(\"_\" + size.TrimStart('_'));\n            }\n            return input;\n        }\n\n        /// <summary>\n        /// Returns the URL of an image. Accepts an image size as a parameter. The img_url filter can be used on the following objects:\n        /// product, variant,  line item, collection, image\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"type\"></param>\n        /// <returns></returns>\n        public static string ImgUrl(object input, string type = null)\n        {\n            if (input == null)\n            {\n                return null;\n            }\n\n            var retVal = input.ToString();\n\n            if (!string.IsNullOrEmpty(retVal))\n            {\n                if (!string.IsNullOrEmpty(type))\n                {\n                    retVal = retVal.AddSuffixToFileUrl(string.Format(\"_{0}\", type));\n                }\n\n                retVal = retVal.RemoveLeadingUriScheme();\n            }\n\n            return retVal;\n        }\n\n        /// <summary>\n        /// Generates an HTML link. The first parameter is the URL of the link, and the optional second parameter is the title of the link.\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"link\"></param>\n        /// <param name=\"title\"></param>\n        /// <returns></returns>\n        public static string LinkTo(object input, string link, string title = \"\")\n        {\n            return string.Format(\"<a href=\\\"{0}\\\" title=\\\"{1}\\\">{2}</a>\", link, title, input);\n        }\n\n        /// <summary>\n        /// Returns the URL of a file in the \"assets\" folder of a theme.\n        /// {{ 'shop.css' | asset_url }}\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string AssetUrl(TemplateContext context, string input)\n        {\n            string retVal = null;\n            if (input != null)\n            {\n                var themeAdaptor = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n                retVal = themeAdaptor.GetAssetAbsoluteUrl(input);\n            }\n            return retVal;\n        }\n\n        /// <summary>\n        /// Returns the URL of a file in the \"assets/static\" folder of a theme.\n        /// {{ 'shop.css' | static_asset_url }}\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string StaticAssetUrl(TemplateContext context, string input)\n        {\n            string retVal = null;\n            if (input != null)\n            {\n                var themeAdaptor = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n                retVal = themeAdaptor.GetAssetAbsoluteUrl(\"static/\" + input.TrimStart('/'));\n            }\n            return retVal;\n        }\n\n        /// <summary>\n        /// Returns the URL of a file.\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string FileUrl(TemplateContext context, string input)\n        {\n            return AssetUrl(context, input);\n        }\n\n        /// <summary>\n        /// Method for switching between multiple stores\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"storeId\"></param>\n        /// <param name=\"languageCode\"></param>\n        /// <returns></returns>\n        public static string StoreAbsoluteUrl(TemplateContext context, string input, string storeId = null, string languageCode = null)\n        {\n            var themeAdaptor = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n            Store store = null;\n            if (!string.IsNullOrEmpty(storeId))\n            {\n                store = themeAdaptor.WorkContext.AllStores.FirstOrDefault(x => string.Equals(x.Id, storeId, StringComparison.InvariantCultureIgnoreCase));\n            }\n            store = store ?? themeAdaptor.WorkContext.CurrentStore;\n\n            var retVal = AbsoluteUrl(context, input, storeId, languageCode);\n\n            var isHttps = themeAdaptor.WorkContext.RequestUrl.Scheme == Uri.UriSchemeHttps;\n            //If store has defined url need redirect to it\n            if (isHttps)\n            {\n                retVal = string.IsNullOrEmpty(store.SecureUrl) ? retVal : store.SecureUrl;\n            }\n            else\n            {\n                retVal = string.IsNullOrEmpty(store.Url) ? retVal : store.Url;\n            }\n            return retVal;\n        }\n\n        public static string FullUrl(TemplateContext context, string input, string storeId = null, string languageCode = null)\n        {\n            var absoluteUrl = AbsoluteUrl(context, input, storeId, languageCode);\n\n            var themeEngine = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n            var workContext = themeEngine.WorkContext;\n\n            var fullUrl = new Uri(workContext.RequestUrl, absoluteUrl);\n\n            return fullUrl.AbsoluteUri;\n        }\n\n        /// <summary>\n        /// Get app absolute storefront url with specified store and language\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <param name=\"storeId\"></param>\n        /// <param name=\"languageCode\"></param>\n        /// <returns></returns>\n        public static string AbsoluteUrl(TemplateContext context, string input, string storeId = null, string languageCode = null)\n        {\n            if (input == null)\n            {\n                return string.Empty;\n            }\n\n            var themeAdaptor = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n            Store store = null;\n            storefrontModel.Language language = null;\n            if (!string.IsNullOrEmpty(storeId))\n            {\n                store = themeAdaptor.WorkContext.AllStores.FirstOrDefault(x => string.Equals(x.Id, storeId, StringComparison.InvariantCultureIgnoreCase));\n            }\n            store = store ?? themeAdaptor.WorkContext.CurrentStore;\n\n            if (!string.IsNullOrEmpty(languageCode))\n            {\n                language = store.Languages.FirstOrDefault(x => string.Equals(x.CultureName, languageCode, StringComparison.InvariantCultureIgnoreCase));\n            }\n            language = language ?? themeAdaptor.WorkContext.CurrentLanguage;\n\n            var retVal = themeAdaptor.UrlBuilder.ToAppAbsolute(input, store, language);\n            return retVal;\n        }\n\n        public static string ProductImgUrl(object input, string type = null)\n        {\n            return ImgUrl(input, type);\n        }\n\n        /// <summary>\n        /// Appends hash of file content as file version to invalidate browser cache when file changed.\n        /// </summary>\n        /// <param name=\"input\"></param>\n        /// <returns></returns>\n        public static string AppendVersion(TemplateContext context, string input)\n        {\n            if (input == null)\n            {\n                return string.Empty;\n            }\n\n            var themeAdaptor = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n            var basePath = themeAdaptor.GetAssetAbsoluteUrl(\"\");\n            var relativePath = input.StartsWith(basePath) ? input.Remove(0, basePath.Length) : input;\n            var hash = themeAdaptor.GetAssetHash(relativePath);\n            return input.Contains('?') ? $\"{input}&v={hash}\" : $\"{input}?v={hash}\";\n        }\n\n\n        /// <summary>\n        ///  Generates an relative url with query string that contains serialized ProductSearchCriteria as parameters\n        ///  and add a new given aggregation item value  to  terms parameter\n        /// </summary>\n        /// <param name=\"context\"></param>\n        /// <param name=\"aggregationItem\">aggregation item</param>\n        /// <returns>example: /collection?terms=color:Red</returns>\n        public static string AddTermUrl(TemplateContext context, string facetName, string term)\n        {\n            var themeAdaptor = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n            var result = themeAdaptor.WorkContext.RequestUrl.SetQueryParameter(\"filter\", $\"{facetName}:{term}\");\n            return result?.PathAndQuery;\n        }\n\n        /// <summary>\n        ///  Generates an relative url with query string that contains serialized ProductSearchCriteria as parameters\n        ///  and remove a given aggregation item value  from  terms parameter\n        /// </summary>\n        /// <param name=\"context\"></param>\n        /// <param name=\"aggregationItem\">aggregation item</param>\n        /// <returns>example: /collection</returns>\n        public static string RemoveTermUrl(TemplateContext context, string facetName, string term)\n        {\n            var themeAdaptor = (ShopifyLiquidThemeEngine)context.TemplateLoader;\n            var result = themeAdaptor.WorkContext.RequestUrl.SetQueryParameter(\"filter\", null);\n            return result?.PathAndQuery;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/ILiquidThemeEngine.cs",
    "content": "using System.Collections.Generic;\nusing System.IO;\nusing System.Threading.Tasks;\nusing Newtonsoft.Json.Linq;\n\nnamespace VirtoCommerce.LiquidThemeEngine\n{\n    public interface ILiquidThemeEngine\n    {\n        IEnumerable<string> DiscoveryPaths { get; }\n        string ResolveTemplatePath(string templateName);\n        ValueTask<string> RenderTemplateByNameAsync(string templateName, object context);\n        ValueTask<string> RenderTemplateAsync(string templateContent, string templatePath, object context);\n        IDictionary<string, object> GetSettings(string defaultValue = null);\n        JObject ReadLocalization();\n        Task<Stream> GetAssetStreamAsync(string filePath);\n        string GetAssetHash(string filePath);\n        string GetAssetAbsoluteUrl(string assetName);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/ILiquidViewEngine.cs",
    "content": "using Microsoft.AspNetCore.Mvc.ViewEngines;\n\nnamespace VirtoCommerce.LiquidThemeEngine\n{\n    public interface ILiquidViewEngine : IViewEngine\n    {\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/ISassFileManager.cs",
    "content": "using LibSassHost;\n\nnamespace VirtoCommerce.LiquidThemeEngine\n{\n    public interface ISassFileManager : IFileManager\n    {\n        string CurrentDirectory { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/JsonConverters/MutablePagedListAsArrayJsonConverter.cs",
    "content": "using System;\nusing System.Linq;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.LiquidThemeEngine.JsonConverters\n{\n    /// <summary>\n    ///This converter is designed to force serialize all derived types from IMutablePagedLists as array.\n    ///Because the main type MutablePagedList<> also derived from IDitionary that  causes the default Json serializer to tries to serialize as a dictionary first.\n    /// </summary>\n    public class MutablePagedListAsArrayJsonConverter : JsonConverter\n    {\n        private readonly JsonSerializerSettings _jsonSettings;\n\n        public MutablePagedListAsArrayJsonConverter()\n        {\n\n        }\n\n        public MutablePagedListAsArrayJsonConverter(JsonSerializerSettings jsonSettings)\n        {\n            _jsonSettings = jsonSettings;\n        }\n        public override bool CanConvert(Type objectType)\n        {\n            return typeof(IMutablePagedList).IsAssignableFrom(objectType);\n        }\n\n        public override bool CanWrite => true;\n        public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)\n        {\n            if (_jsonSettings != null)\n            {\n                serializer = JsonSerializer.Create(_jsonSettings);\n            }\n            var toListMethod = typeof(Enumerable).GetMethod(\"ToList\");\n            var constructedToList = toListMethod.MakeGenericMethod(value.GetType().GetGenericArguments()[0]);\n            var list = constructedToList.Invoke(null, new object[] { value });\n            //Force serialize MutablePagedList type as array, instead of dictionary\n            var result = JArray.FromObject(list, serializer);\n            result.WriteTo(writer);\n        }\n\n        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)\n        {\n            throw new NotImplementedException();\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/LiquidThemeEngineOptions.cs",
    "content": "using System;\nusing System.Collections.Generic;\n\nnamespace VirtoCommerce.LiquidThemeEngine\n{\n    public class LiquidThemeEngineOptions\n    {\n        public string DefaultLayout { get; set; } = \"theme\";\n        public IList<string> TemplatesDiscoveryFolders { get; set; } = new List<string>() { \"templates\", \"snippets\", \"layout\", \"assets\" };\n        public string ThemesAssetsRelativeUrl { get; set; } = \"~/themes/assets\";\n        public bool RethrowLiquidRenderErrors { get; set; } = false;\n\n        /// <summary>\n        /// The path to the base theme that will be used to discover the theme resources not found by the path of theme for current store.\n        /// This parameter can be used for theme inheritance logic.\n        /// Example values:\n        ///   Electronics/default -> wwwroot/cms-content/Themes/Electronics/default\n        ///   default-> wwwroot/cms-content/Themes/default\n        /// </summary>\n        public string BaseThemePath { get; set; }\n\n        /// <summary>\n        /// Original description:\n        /// The name of the base theme that will be used to discover the theme resources not found by the path of theme for current store.\n        /// This parameter can be used for theme inheritance logic.\n        /// Example values: default_theme -> wwwroot/cms-content/default_theme\n        ///\n        /// How it actually worked:\n        /// Storefront used this parameter as a store name, i.e. Electronics -> wwwroot/cms-content/Themes/Electronics/default\n        /// </summary>\n        [Obsolete(\"Obsolete. Use BaseThemePath instead.\")]\n        public string BaseThemeName { get; set; }\n\n        /// <summary>\n        /// Set to true if you want to merge current theme settings with base theme settings instead of placement\n        /// </summary>\n        public bool MergeBaseSettings { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/LiquidThemedView.cs",
    "content": "using System;\nusing System.Linq;\nusing System.Reflection;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Mvc.Rendering;\nusing Microsoft.AspNetCore.Mvc.ViewEngines;\nusing VirtoCommerce.LiquidThemeEngine.Scriban;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.LiquidThemeEngine\n{\n    public class LiquidThemedView : IView\n    {\n        private readonly ILiquidThemeEngine _liquidThemeEngine;\n        private readonly string _viewName;\n        private readonly bool _isMainPage;\n        private readonly IWorkContextAccessor _workContextAccessor;\n        private readonly IStorefrontUrlBuilder _urlBuilder;\n        public LiquidThemedView(IWorkContextAccessor workContextAccessor, IStorefrontUrlBuilder urlBuilder, ILiquidThemeEngine themeEngine, string viewName, string path, bool isMainPage)\n        {\n            if (string.IsNullOrEmpty(viewName))\n            {\n                throw new ArgumentNullException(nameof(viewName));\n            }\n            _workContextAccessor = workContextAccessor;\n            _urlBuilder = urlBuilder;\n            _liquidThemeEngine = themeEngine ?? throw new ArgumentNullException(nameof(themeEngine));\n            _viewName = viewName;\n            _isMainPage = isMainPage;\n            Path = path;\n        }\n\n        public string Path { get; private set; }\n\n        #region IView members\n        public virtual Task RenderAsync(ViewContext context)\n        {\n            if (context == null)\n            {\n                throw new ArgumentNullException(nameof(context));\n            }\n            return RenderInternalAsync(context);\n        }\n\n        #endregion\n\n        protected virtual async Task RenderInternalAsync(ViewContext context)\n        {\n            var workContext = _workContextAccessor.WorkContext;\n            //Set current template\n            workContext.Template = _viewName;\n            workContext.Version = Assembly.GetExecutingAssembly().GetName().Version.ToString();\n\n            var formErrors = context.ViewData.ModelState.Where(x => x.Value.Errors.Any())\n                                                        .SelectMany(x => x.Value.Errors.Select(y => new FormError { Code = x.Key.PascalToKebabCase(), Description = y.ErrorMessage })).ToList();\n\n\n            if (workContext.Form == null)\n            {\n                workContext.Form = new Form();\n            }\n            workContext.Form.PostedSuccessfully = !string.Equals(context.HttpContext.Request.Method, \"GET\", StringComparison.InvariantCultureIgnoreCase);\n            if (formErrors.Any())\n            {\n                workContext.Form.Errors.AddRange(formErrors);\n                workContext.Form.PostedSuccessfully = false;\n            }\n\n            //Add settings to context\n            workContext.Settings = _liquidThemeEngine.GetSettings();\n\n            if (string.IsNullOrEmpty(_workContextAccessor.WorkContext.ErrorMessage))\n            {\n                workContext.ErrorMessage = workContext.Form.Errors.FirstOrDefault()?.Description;\n            }\n            var scriptObject = workContext.ToScriptObject();\n\n            var result = await _liquidThemeEngine.RenderTemplateByNameAsync(_viewName, scriptObject);\n\n            // don't use layouts for partial views when masterViewName is not specified\n            if (_isMainPage)\n            {\n                var masterViewName = workContext.Layout ?? \"theme\";\n\n                var headerTemplate = _liquidThemeEngine.ResolveTemplatePath(\"content_header\") == null ? \"\" : await _liquidThemeEngine.RenderTemplateByNameAsync(\"content_header\", scriptObject);\n\n                //add special placeholder 'content_for_layout' to content it will be replaced in master page by main content\n                scriptObject.Add(\"content_for_layout\", result);\n                scriptObject.Add(\"content_for_header\", headerTemplate);\n\n                result = await _liquidThemeEngine.RenderTemplateByNameAsync(masterViewName, scriptObject);\n            }\n            await context.Writer.WriteAsync(result);\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/LiquidThemedViewEngine.cs",
    "content": "using System.Linq;\nusing Microsoft.AspNetCore.Mvc;\nusing Microsoft.AspNetCore.Mvc.ViewEngines;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.LiquidThemeEngine\n{\n    public class LiquidThemedViewEngine : ILiquidViewEngine\n    {\n        private readonly ILiquidThemeEngine _themeEngine;\n        private readonly IWorkContextAccessor _workContextAccessor;\n        private readonly IStorefrontUrlBuilder _urlBuilder;\n        public LiquidThemedViewEngine(IWorkContextAccessor workContextAccessor, IStorefrontUrlBuilder urlBuilder, ILiquidThemeEngine themeEngine)\n        {\n            _themeEngine = themeEngine;\n            _workContextAccessor = workContextAccessor;\n            _urlBuilder = urlBuilder;\n        }\n\n        #region IViewEngine members\n\n        public ViewEngineResult FindView(ActionContext context, string viewName, bool isMainPage)\n        {\n            return InnerGetView(viewName, isMainPage);\n        }\n\n        public ViewEngineResult GetView(string executingFilePath, string viewPath, bool isMainPage)\n        {\n            return InnerGetView(viewPath, isMainPage);\n        }\n        #endregion\n\n        protected ViewEngineResult InnerGetView(string view, bool isMainPage)\n        {\n            var searchedLocations = Enumerable.Empty<string>();\n\n            //Do not handle without a set WorkContext\n            if (_workContextAccessor.WorkContext != null)\n            {\n                var path = _themeEngine.ResolveTemplatePath(view);\n                if (!string.IsNullOrEmpty(path))\n                {\n                    return ViewEngineResult.Found(view, new LiquidThemedView(_workContextAccessor, _urlBuilder, _themeEngine, view, path, isMainPage));\n                }\n                searchedLocations = _themeEngine.DiscoveryPaths.ToArray();\n            }\n            return ViewEngineResult.NotFound(view, searchedLocations);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Objects/Paginate.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing PagedList.Core;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Objects\n{\n    /// <summary>\n    /// https://docs.shopify.com/themes/liquid-documentation/objects/paginate\n    /// The paginate tag's navigation is built using the attributes of the paginate object. You can also use the default_pagination filter for a quicker alternative.\n    /// </summary>\n    public partial class Paginate : ValueObject\n    {\n        private readonly IPagedList _pagedList;\n\n        public Paginate(IPagedList pagedList)\n        {\n            _pagedList = pagedList;\n            Parts = new List<Part>();\n        }\n        /// <summary>\n        /// Returns the number of the current page.\n        /// </summary>\n        public int CurrentPage\n        {\n            get\n            {\n                return _pagedList.PageNumber;\n            }\n        }\n        /// <summary>\n        /// Returns the total number of items that are on the pages previous to the current one. For example, if you are paginating by 5 and are on the third page, paginate.current_offset would return 10.\n        /// </summary>\n        public int CurrentOffset\n        {\n            get\n            {\n                return _pagedList.FirstItemOnPage;\n            }\n        }\n        /// <summary>\n        /// Returns the total number of items to be paginated. For example, if you are paginating a collection of 120 products, paginate.items would return 120.\n        /// </summary>\n        public int Items\n        {\n            get\n            {\n                return _pagedList.TotalItemCount;\n            }\n        }\n        /// <summary>\n        /// Returns the number of items displayed per page.\n        /// </summary>\n        public int PageSize\n        {\n            get\n            {\n                return _pagedList.PageSize;\n            }\n        }\n        /// <summary>\n        /// Returns the part variable for the Next link in the pagination navigation.\n        /// </summary>\n        public Part Next\n        {\n            get\n            {\n                Part retVal = null;\n                if (!_pagedList.IsLastPage)\n                {\n                    retVal = Parts[CurrentPage];\n                }\n                return retVal;\n            }\n        }\n        /// <summary>\n        /// Returns the part variable for the Previous link in the pagination navigation.\n        /// </summary>\n        public Part Previous\n        {\n            get\n            {\n                Part retVal = null;\n                if (!_pagedList.IsFirstPage)\n                {\n                    retVal = Parts[Math.Min(Parts.Count - 1, Math.Max(0, CurrentPage - 2))];\n                }\n                return retVal;\n            }\n        }\n        /// <summary>\n        /// Returns the number of pages created by the pagination tag.\n        /// </summary>\n        public int Pages\n        {\n            get\n            {\n                return _pagedList.PageCount;\n            }\n        }\n        /// <summary>\n        /// Returns an array of all parts of the pagination. A part is a component used to build the navigation for the pagination.\n        /// </summary>\n        public List<Part> Parts { get; set; }\n    }\n\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Objects/Part.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Objects\n{\n    /// <summary>\n    /// https://docs.shopify.com/themes/liquid-documentation/objects/part\n    /// Each part returned by the paginate.parts array represents a link in the pagination's navigation.\n    /// </summary>\n    public partial class Part : ValueObject\n    {\n        /// <summary>\n        /// Returns true if the part is a link, returns false if it is not.\n        /// </summary>\n        public bool IsLink { get; set; }\n\n        /// <summary>\n        /// Returns the title of the part.\n        /// </summary>\n        public string Title { get; set; }\n\n        /// <summary>\n        /// Returns the URL of the part.\n        /// </summary>\n        public string Url { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/SassFileManager.cs",
    "content": "using System;\nusing System.IO;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.StaticContent;\n\nnamespace VirtoCommerce.LiquidThemeEngine\n{\n    public class SassFileManager : ISassFileManager\n    {\n        private readonly IContentBlobProvider _contentBlobProvider;\n\n        public bool SupportsConversionToAbsolutePath { get; } = false;\n\n        public string CurrentDirectory { get; set; }\n\n        public SassFileManager(IContentBlobProvider contentBlobProvider)\n        {\n            _contentBlobProvider = contentBlobProvider;\n        }\n\n        public string GetCurrentDirectory() => CurrentDirectory;\n\n        public bool FileExists(string path)\n        {\n            // Workaround for directories\n            if (string.IsNullOrEmpty(Path.GetExtension(path)))\n            {\n                return false;\n            }\n            return _contentBlobProvider.PathExists(path);\n        }\n\n        public bool IsAbsolutePath(string path)\n        {\n            return Path.GetDirectoryName(path).StartsWith(CurrentDirectory);\n        }\n\n        public string ToAbsolutePath(string path)\n        {\n            throw new NotImplementedException();\n        }\n\n        public string ReadFile(string path)\n        {\n            return _contentBlobProvider.OpenRead(path).ReadToString();\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/Scriban/WorkContextConverter.cs",
    "content": "using System;\nusing Scriban.Runtime;\nusing VirtoCommerce.LiquidThemeEngine.Filters;\nusing VirtoCommerce.Storefront.Model;\n\nnamespace VirtoCommerce.LiquidThemeEngine.Scriban\n{\n    public static class WorkContextConverter\n    {\n        public static ScriptObject ToScriptObject(this WorkContext workContext)\n        {\n            var scriptObject = new ScriptObject();\n            scriptObject.Import(workContext);\n\n            scriptObject.Import(typeof(CommonFilters));\n            scriptObject.Import(typeof(CommerceFilters));\n            scriptObject.Import(typeof(TranslationFilter));\n            scriptObject.Import(typeof(UrlFilters));\n            scriptObject.Import(typeof(MoneyFilters));\n            scriptObject.Import(typeof(HtmlFilters));\n            scriptObject.Import(typeof(StringFilters));\n            scriptObject.Import(typeof(ArrayFilters));\n            scriptObject.Import(typeof(MathFilters));\n            scriptObject.Import(typeof(StandardFilters));\n            scriptObject.Import(typeof(FeatureFilter));\n            scriptObject.Import(typeof(DataSourceFilter));\n\n            scriptObject.SetValue(\"context\", scriptObject, true);\n            scriptObject.SetValue(\"blank\", EmptyScriptObject.Default, true);\n            //Store special layout setter action in the context, it is allows to set the WorkContext.Layout property from template during rendering in the CommonFilters.Layout function\n            Action<string> layoutSetter = (layout) => workContext.Layout = layout;\n            scriptObject.Add(\"layout_setter\", layoutSetter);\n            return scriptObject;\n\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/SettingsManager.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Newtonsoft.Json.Linq;\nusing VirtoCommerce.Storefront.Model.Common.Exceptions;\n\nnamespace VirtoCommerce.LiquidThemeEngine\n{\n    public static class SettingsManager\n    {\n        public class Settings\n        {\n            public Preset CurrentPreset { get; set; }\n\n            public IList<Preset> Presets { get; set; } = new List<Preset>();\n        }\n\n        public class Preset\n        {\n            public string Name { get; set; }\n\n            public JObject Json { get; set; }\n        }\n\n        public static JObject Merge(JObject baseJson, JObject currentJson)\n        {\n            if (baseJson == null)\n            {\n                throw new ArgumentNullException(nameof(baseJson));\n            }\n            if (currentJson == null)\n            {\n                throw new ArgumentNullException(nameof(currentJson));\n            }\n\n            var baseSettings = ReadSettings(baseJson);\n            var currentSettings = ReadSettings(currentJson);\n            //Change the current preset for base doc according to head preset value if it specified\n            if (!string.IsNullOrEmpty(currentSettings.CurrentPreset.Name))\n            {\n                baseSettings.CurrentPreset = baseSettings.Presets.FirstOrDefault(x => x.Name == currentSettings.CurrentPreset.Name);\n            }\n            var result = baseSettings.CurrentPreset?.Json ?? new JObject();\n            result.Merge(currentSettings.CurrentPreset.Json, new JsonMergeSettings { MergeArrayHandling = MergeArrayHandling.Merge });\n            return result;\n        }\n\n        public static Settings ReadSettings(JObject json)\n        {\n            var result = new Settings\n            {\n                CurrentPreset = new Preset\n                {\n                    Json = json\n                }\n            };\n\n            if (json.GetValue(\"presets\") is JObject presetsJson)\n            {\n                var allPresetsJsonProperties = presetsJson.Children().Cast<JProperty>().ToList();\n                foreach (var presetJsonProperty in allPresetsJsonProperties)\n                {\n                    var preset = new Preset\n                    {\n                        Name = presetJsonProperty.Name,\n                        Json = presetJsonProperty.Value as JObject\n                    };\n                    result.Presets.Add(preset);\n                }\n            }\n\n            var currentPresetJsonToken = json.GetValue(\"current\");\n            if (currentPresetJsonToken is JValue currentPresetJsonValue)\n            {\n                var presetName = currentPresetJsonValue.Value.ToString();\n                var currentPresetJson = result.Presets.FirstOrDefault(x => x.Name == presetName)?.Json;\n                if (currentPresetJson == null && result.Presets.Any())\n                {\n                    throw new StorefrontException($\"Setting preset with name '{presetName}' not found\");\n                }\n                result.CurrentPreset.Name = presetName;\n                result.CurrentPreset.Json = currentPresetJson ?? json;\n            }\n            if (currentPresetJsonToken is JObject)\n            {\n                result.CurrentPreset.Json = currentPresetJsonToken as JObject;\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/ShopifyLiquidThemeEngine.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Security.Cryptography;\nusing System.Text;\nusing System.Text.RegularExpressions;\nusing System.Threading.Tasks;\nusing DotLiquid.ViewEngine.Exceptions;\nusing GraphQL.Client.Abstractions;\nusing LibSassHost;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.AspNetCore.WebUtilities;\nusing Microsoft.Extensions.Caching.Memory;\nusing Microsoft.Extensions.Options;\nusing Microsoft.Extensions.Primitives;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\nusing Scriban;\nusing Scriban.Parsing;\nusing Scriban.Runtime;\nusing VirtoCommerce.LiquidThemeEngine.Scriban;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\nusing VirtoCommerce.Storefront.Model.Common.Exceptions;\nusing VirtoCommerce.Storefront.Model.Features;\nusing VirtoCommerce.Storefront.Model.StaticContent;\n\nnamespace VirtoCommerce.LiquidThemeEngine\n{\n    /// <summary>\n    /// Shopify compliant theme folder structure and all methods for rendering\n    /// assets - storages for css, images and other assets\n    /// config - contains theme configuration\n    /// layout - master pages and layouts\n    /// locales - localization resources\n    /// snippets - snippets - partial views\n    /// templates - view templates\n    /// </summary>\n    public class ShopifyLiquidThemeEngine : ILiquidThemeEngine, ITemplateLoader\n    {\n        private readonly LiquidThemeEngineOptions _options;\n        private static readonly Regex _isLiquid = new Regex(\"[{}|]\", RegexOptions.Compiled);\n        private const string _liquidTemplateFormat = \"{0}.liquid\";\n        private readonly IWorkContextAccessor _workContextAccessor;\n        private readonly IHttpContextAccessor _httpContextAccessor;\n        private readonly IStorefrontMemoryCache _memoryCache;\n        private readonly IContentBlobProvider _themeBlobProvider;\n        private readonly ISassFileManager _sassFileManager;\n        private readonly IFeaturesAgent _featuresAgent;\n        private readonly IGraphQLClient _graphQLClient;\n\n        public ShopifyLiquidThemeEngine(\n            IStorefrontMemoryCache memoryCache\n            , IWorkContextAccessor workContextAccessor\n            , IHttpContextAccessor httpContextAccessor\n            , IStorefrontUrlBuilder storeFrontUrlBuilder\n            , IContentBlobProvider contentBlobProvider\n            , ISassFileManager sassFileManager\n            , IOptions<LiquidThemeEngineOptions> options\n            , IFeaturesAgent featuresAgent\n            , IGraphQLClient graphQLClient)\n        {\n            _workContextAccessor = workContextAccessor;\n            _httpContextAccessor = httpContextAccessor;\n            UrlBuilder = storeFrontUrlBuilder;\n            _options = options.Value;\n            _memoryCache = memoryCache;\n            _themeBlobProvider = contentBlobProvider;\n            _sassFileManager = sassFileManager;\n            _featuresAgent = featuresAgent;\n            _graphQLClient = graphQLClient;\n            SassCompiler.FileManager = sassFileManager;\n        }\n\n        /// <summary>\n        /// Main work context\n        /// </summary>\n        public WorkContext WorkContext => _workContextAccessor.WorkContext;\n\n        /// <summary>\n        /// Current HttpContext\n        /// </summary>\n        public HttpContext HttpContext => _httpContextAccessor.HttpContext;\n\n        public IGraphQLClient GraphQLClient => _graphQLClient;\n\n        /// <summary>\n        /// Store url builder\n        /// </summary>\n        public IStorefrontUrlBuilder UrlBuilder { get; }\n\n        /// <summary>\n        /// Default master view name\n        /// </summary>\n        public string MasterViewName => _options.DefaultLayout;\n\n        /// <summary>\n        /// Current theme name\n        /// </summary>\n        public string CurrentThemeName => !string.IsNullOrEmpty(WorkContext.CurrentStore.ThemeName) ? WorkContext.CurrentStore.ThemeName : \"default\";\n\n        public string CurrentThemeSettingPath => Path.Combine(CurrentThemePath, \"config\", GetSettingsFilePath());\n        public string CurrentThemeLocalePath => Path.Combine(CurrentThemePath, \"locales\");\n        /// <summary>\n        /// The path for current theme \n        /// </summary>\n        private string CurrentThemePath => Path.Combine(\"Themes\", WorkContext.CurrentStore.Id, CurrentThemeName);\n\n        //Relative path to the discovery of theme resources that weren't found by the current path.\n        private string BaseThemePath\n        {\n            get\n            {\n                if (!string.IsNullOrEmpty(_options.BaseThemePath))\n                {\n                    return Path.Combine(\"Themes\", _options.BaseThemePath);\n                }\n\n#pragma warning disable 618\n                // We need to use obsolete value here for backward compatibility.\n                return !string.IsNullOrEmpty(_options.BaseThemeName) ? Path.Combine(\"Themes\", _options.BaseThemeName, \"default\") : null;\n#pragma warning restore 618\n            }\n\n        }\n\n        private string BaseThemeSettingPath => BaseThemePath != null ? Path.Combine(BaseThemePath, \"config\", \"settings_data.json\") : null;\n        public string BaseThemeLocalePath => BaseThemePath != null ? Path.Combine(BaseThemePath, \"locales\") : null;\n\n\n        #region ITemplateLoader members\n        public string GetPath(TemplateContext context, SourceSpan callerSpan, string templateName)\n        {\n            return ResolveTemplatePath(templateName);\n        }\n\n        public string Load(TemplateContext context, SourceSpan callerSpan, string templatePath)\n        {\n            var content = ReadTemplateByPath(templatePath);\n            return content;\n        }\n\n        public ValueTask<string> LoadAsync(TemplateContext context, SourceSpan callerSpan, string templatePath)\n        {\n            return new ValueTask<string>(Load(context, callerSpan, templatePath));\n        }\n\n        #endregion\n\n        #region ILiquidThemeEngine Members\n        public IEnumerable<string> DiscoveryPaths\n        {\n            get\n            {\n                var retVal = Enumerable.Empty<string>();\n                if (WorkContext.CurrentStore != null)\n                {\n                    retVal = _options.TemplatesDiscoveryFolders.Select(x => Path.Combine(CurrentThemePath, x));\n                    if (BaseThemePath != null)\n                    {\n                        retVal = retVal.Concat(_options.TemplatesDiscoveryFolders.Select(x => Path.Combine(BaseThemePath, x)));\n                    }\n                }\n                return retVal;\n            }\n        }\n\n        /// <summary>\n        /// Return stream for requested  asset file  (used for search current and base themes assets)\n        /// </summary>\n        /// <param name=\"filePath\"></param>\n        /// <returns></returns>\n        public async Task<Stream> GetAssetStreamAsync(string filePath)\n        {\n            Stream retVal = null;\n            var filePathWithoutExtension = Path.Combine(Path.GetDirectoryName(filePath), Path.GetFileNameWithoutExtension(filePath));\n\n            var searchPatterns = new[] { filePath, string.Format(_liquidTemplateFormat, filePathWithoutExtension), string.Format(_liquidTemplateFormat, filePath), filePathWithoutExtension };\n\n\n            string currentThemeFilePath = null;\n            //try to search in current store theme \n            if (_themeBlobProvider.PathExists(Path.Combine(CurrentThemePath, \"assets\")))\n            {\n                currentThemeFilePath = searchPatterns.SelectMany(x => _themeBlobProvider.Search(Path.Combine(CurrentThemePath, \"assets\"), x, true)).FirstOrDefault();\n            }\n            //If not found by current theme path try find them by base path if it is defined\n            if (currentThemeFilePath == null && BaseThemePath != null)\n            {\n                currentThemeFilePath = searchPatterns.SelectMany(x => _themeBlobProvider.Search(Path.Combine(BaseThemePath, \"assets\"), x, true)).FirstOrDefault();\n            }\n\n            if (currentThemeFilePath != null)\n            {\n                retVal = _themeBlobProvider.OpenRead(currentThemeFilePath);\n                filePath = currentThemeFilePath;\n            }\n\n            if (retVal != null && filePath.EndsWith(\".liquid\"))\n            {\n                var context = WorkContext.Clone() as WorkContext;\n                context.Settings = GetSettings(\"''\");\n                var templateContent = retVal.ReadToString();\n                retVal.Dispose();\n\n                var template = await RenderTemplateAsync(templateContent, filePath, context.ToScriptObject());\n                retVal = new MemoryStream(Encoding.UTF8.GetBytes(template));\n            }\n\n            if (retVal != null && (filePath.Contains(\".scss.\") && filePath.EndsWith(\".liquid\") || filePath.EndsWith(\".scss\")))\n            {\n                var content = retVal.ReadToString();\n                retVal.Dispose();\n\n                try\n                {\n                    //handle scss resources\n                    _sassFileManager.CurrentDirectory = Path.GetDirectoryName(filePath);\n                    var result = SassCompiler.Compile(content);\n                    content = result.CompiledContent;\n\n                    retVal = new MemoryStream(Encoding.UTF8.GetBytes(content));\n                }\n                catch (Exception ex)\n                {\n                    throw new SaasCompileException(filePath, content, ex);\n                }\n            }\n\n            return retVal;\n        }\n\n\n        /// <summary>\n        /// Return hash of requested asset (used for file versioning)\n        /// </summary>\n        /// <param name=\"filePath\"></param>\n        /// <returns></returns>\n        public string GetAssetHash(string filePath)\n        {\n            var cacheKey = CacheKey.With(GetType(), \"GetAssetHash\", filePath);\n            return _memoryCache.GetOrCreateExclusive(cacheKey, (cacheEntry) =>\n            {\n                cacheEntry.AddExpirationToken(new CompositeChangeToken(new[] { ThemeEngineCacheRegion.CreateChangeToken(), _themeBlobProvider.Watch(filePath), _themeBlobProvider.Watch(CurrentThemeSettingPath) }));\n\n                using var stream = GetAssetStreamAsync(filePath).GetAwaiter().GetResult();\n                if (stream == null)\n                {\n                    throw new StorefrontException($\"Theme resource for path '{filePath}' not found\");\n                }\n                var hashAlgorithm = SHA256.Create();\n                return WebEncoders.Base64UrlEncode(hashAlgorithm.ComputeHash(stream));\n            });\n        }\n\n        /// <summary>\n        /// resolve  template path by it name\n        /// </summary>\n        /// <param name=\"templateName\"></param>\n        /// <returns></returns>\n        public string ResolveTemplatePath(string templateName)\n        {\n            if (WorkContext.CurrentStore == null)\n            {\n                return null;\n            }\n\n            var liquidTemplateFileName = string.Format(_liquidTemplateFormat, templateName);\n            //If not found by current theme path try find them by base path if it is defined\n            var curentThemeDiscoveryPaths = _options.TemplatesDiscoveryFolders.Select(x => Path.Combine(CurrentThemePath, x, liquidTemplateFileName));\n            if (BaseThemePath != null)\n            {\n                curentThemeDiscoveryPaths = curentThemeDiscoveryPaths.Concat(_options.TemplatesDiscoveryFolders.Select(x => Path.Combine(BaseThemePath, x, liquidTemplateFileName)));\n            }\n            //Try to find template in current theme folder\n            return curentThemeDiscoveryPaths.FirstOrDefault(x => _themeBlobProvider.PathExists(x));\n\n        }\n\n        /// <summary>\n        /// Render template by name and with passed context (parameters)\n        /// </summary>\n        /// <param name=\"templateName\"></param>\n        /// <param name=\"parameters\"></param>\n        /// <returns></returns>\n        public ValueTask<string> RenderTemplateByNameAsync(string templateName, object context)\n        {\n            if (string.IsNullOrEmpty(templateName))\n            {\n                throw new ArgumentNullException(nameof(templateName));\n            }\n\n            return RenderTemplateByNameInternalAsync(templateName, context);\n        }\n\n        private async ValueTask<string> RenderTemplateByNameInternalAsync(string templateName, object context)\n        {\n            var templatePath = ResolveTemplatePath(templateName);\n            if (string.IsNullOrEmpty(templatePath))\n            {\n                throw new FileNotFoundException($\"The template '{templateName}' was not found. The following locations were searched:<br/>{string.Join(\"<br/>\", DiscoveryPaths)}\");\n            }\n            var templateContent = ReadTemplateByPath(templatePath);\n            var retVal = await RenderTemplateAsync(templateContent, templatePath, context);\n            return retVal;\n        }\n\n        /// <summary>\n        /// Render template by content and parameters\n        /// </summary>\n        /// <param name=\"templateContent\"></param>\n        /// <param name=\"parameters\"></param>\n        /// <returns></returns>\n        public ValueTask<string> RenderTemplateAsync(string templateContent, string templatePath, object context)\n        {\n            if (context == null)\n            {\n                throw new ArgumentNullException(nameof(context));\n            }\n\n            if (!(context is IScriptObject scriptObject))\n            {\n                throw new StorefrontException($\"{nameof(context)} must implement IScriptObject\");\n            }\n\n            if (string.IsNullOrEmpty(templateContent))\n            {\n                return new ValueTask<string>(templateContent);\n            }\n\n            var isLiquidTemplate = _isLiquid.Match(templateContent);\n            if (!isLiquidTemplate.Success)\n            {\n                return new ValueTask<string>(templateContent);\n            }\n\n            var cacheKey = CacheKey.With(GetType(), \"ParseTemplate\", templatePath ?? templateContent);\n            var parsedTemplate = _memoryCache.GetOrCreate(cacheKey, (cacheItem) =>\n            {\n                if (!string.IsNullOrEmpty(templatePath))\n                {\n                    cacheItem.AddExpirationToken(new CompositeChangeToken(new[] { ThemeEngineCacheRegion.CreateChangeToken(), _themeBlobProvider.Watch(templatePath) }));\n                }\n                else\n                {\n                    cacheItem.AddExpirationToken(ThemeEngineCacheRegion.CreateChangeToken());\n                }\n                return Template.ParseLiquid(templateContent, templatePath);\n            });\n\n            if (parsedTemplate.HasErrors)\n            {\n                throw new InvalidOperationException(string.Join(\"\\n\", parsedTemplate.Messages));\n            }\n\n\n            var templateContext = new TemplateContext()\n            {\n                TemplateLoader = this,\n                EnableRelaxedMemberAccess = true,\n                NewLine = Environment.NewLine,\n                TemplateLoaderLexerOptions = new LexerOptions\n                {\n                    Mode = ScriptMode.Default,\n                    Lang = ScriptLang.Liquid\n                }\n            };\n            templateContext.PushGlobal(scriptObject);\n\n            var result = parsedTemplate.Render(templateContext);\n            return new ValueTask<string>(result);\n        }\n\n        /// <summary>\n        /// Read shopify theme settings from 'config' folder\n        /// </summary>\n        /// <param name=\"defaultValue\"></param>\n        /// <returns></returns>\n        public IDictionary<string, object> GetSettings(string defaultValue = null)\n        {\n            var cacheKey = CacheKey.With(GetType(), \"GetSettings\", CurrentThemeSettingPath, defaultValue);\n            return _memoryCache.GetOrCreateExclusive(cacheKey, cacheItem =>\n            {\n                cacheItem.AddExpirationToken(new CompositeChangeToken(new[] { ThemeEngineCacheRegion.CreateChangeToken(), _themeBlobProvider.Watch(CurrentThemeSettingPath) }));\n\n                var baseThemeSettings = new JObject();\n                var currentThemeSettings = InnerGetAllSettings(_themeBlobProvider, CurrentThemeSettingPath);\n\n                //Try to load settings from base theme path and merge them with resources for local theme\n                if ((_options.MergeBaseSettings || currentThemeSettings == null) && !string.IsNullOrEmpty(BaseThemeSettingPath))\n                {\n                    cacheItem.AddExpirationToken(new CompositeChangeToken(new[] { ThemeEngineCacheRegion.CreateChangeToken(), _themeBlobProvider.Watch(BaseThemeSettingPath) }));\n                    baseThemeSettings = InnerGetAllSettings(_themeBlobProvider, BaseThemeSettingPath);\n                }\n\n                var result = _options.MergeBaseSettings\n                    ? SettingsManager.Merge(baseThemeSettings, currentThemeSettings ?? new JObject())\n                    : SettingsManager.ReadSettings(currentThemeSettings ?? new JObject()).CurrentPreset.Json;\n\n                return result.ToObject<Dictionary<string, object>>().ToDictionary(x => x.Key, x => x.Value).WithDefaultValue(defaultValue);\n            });\n        }\n\n\n        /// <summary>\n        /// Read localization resources \n        /// </summary>\n        /// <returns></returns>\n        public JObject ReadLocalization()\n        {\n            var cacheKey = CacheKey.With(GetType(), \"ReadLocalization\", CurrentThemeLocalePath, WorkContext.CurrentLanguage.CultureName);\n            return _memoryCache.GetOrCreateExclusive(cacheKey, (cacheItem) =>\n            {\n                var result = new JObject();\n                cacheItem.AddExpirationToken(new CompositeChangeToken(new[] { ThemeEngineCacheRegion.CreateChangeToken(), _themeBlobProvider.Watch(CurrentThemeLocalePath + \"/*\") }));\n                //Try to load localization resources from base theme path and merge them with resources for local theme\n                if (BaseThemeLocalePath != null)\n                {\n                    cacheItem.AddExpirationToken(new CompositeChangeToken(new[] { ThemeEngineCacheRegion.CreateChangeToken(), _themeBlobProvider.Watch(BaseThemeLocalePath + \"/*\") }));\n                    result = InnerReadLocalization(_themeBlobProvider, BaseThemeLocalePath, WorkContext.CurrentLanguage) ?? new JObject();\n                }\n                result.Merge(InnerReadLocalization(_themeBlobProvider, CurrentThemeLocalePath, WorkContext.CurrentLanguage) ?? new JObject(), new JsonMergeSettings { MergeArrayHandling = MergeArrayHandling.Merge });\n                return result;\n\n            });\n        }\n\n        /// <summary>\n        /// Get relative url for assets (assets folder)\n        /// </summary>\n        /// <param name=\"assetName\"></param>\n        /// <returns></returns>\n        public string GetAssetAbsoluteUrl(string assetName)\n        {\n            const char delimiter = '/';\n            return UrlBuilder.ToAppAbsolute(_options.ThemesAssetsRelativeUrl.TrimEnd(delimiter) + delimiter + assetName.TrimStart(delimiter), WorkContext.CurrentStore, WorkContext.CurrentLanguage);\n        }\n\n        #endregion\n\n        private static JObject InnerReadLocalization(IContentBlobProvider themeBlobProvider, string localePath, Language language)\n        {\n            JObject retVal = null;\n\n            if (themeBlobProvider.PathExists(localePath))\n            {\n                JObject localeJson = null;\n                JObject defaultJson = null;\n\n                foreach (var languageName in new[] { language.CultureName, language.TwoLetterLanguageName })\n                {\n                    var currentLocalePath = Path.Combine(localePath, string.Concat(languageName, \".json\"));\n\n                    if (themeBlobProvider.PathExists(currentLocalePath))\n                    {\n                        using var stream = themeBlobProvider.OpenRead(currentLocalePath);\n                        localeJson = JsonConvert.DeserializeObject<dynamic>(stream.ReadToString());\n                        break;\n                    }\n                }\n\n                var localeDefaultPath = themeBlobProvider.Search(localePath, \"*.default.json\", false).FirstOrDefault();\n\n                if (localeDefaultPath != null && themeBlobProvider.PathExists(localeDefaultPath))\n                {\n                    using var stream = themeBlobProvider.OpenRead(localeDefaultPath);\n                    defaultJson = JsonConvert.DeserializeObject<dynamic>(stream.ReadToString());\n                }\n\n                //Need merge default and requested localization json to resulting object\n                retVal = defaultJson ?? localeJson;\n\n                if (defaultJson != null && localeJson != null)\n                {\n                    retVal.Merge(localeJson, new JsonMergeSettings { MergeArrayHandling = MergeArrayHandling.Merge });\n                }\n            }\n            return retVal;\n        }\n\n        private static JObject InnerGetAllSettings(IContentBlobProvider themeBlobProvider, string settingsPath)\n        {\n            if (settingsPath == null)\n            {\n                throw new ArgumentNullException(nameof(settingsPath));\n            }\n\n            var result = new JObject();\n\n            if (themeBlobProvider.PathExists(settingsPath))\n            {\n                using var stream = themeBlobProvider.OpenRead(settingsPath);\n                result = JsonConvert.DeserializeObject<JObject>(stream.ReadToString());\n            }\n            return result;\n        }\n\n\n\n        private string ReadTemplateByPath(string templatePath)\n        {\n            if (string.IsNullOrEmpty(templatePath))\n            {\n                throw new ArgumentNullException(nameof(templatePath));\n            }\n\n            var cacheKey = CacheKey.With(GetType(), \"ReadTemplateByName\", templatePath);\n            return _memoryCache.GetOrCreateExclusive(cacheKey, (cacheItem) =>\n            {\n                cacheItem.AddExpirationToken(new CompositeChangeToken(new[] { ThemeEngineCacheRegion.CreateChangeToken(), _themeBlobProvider.Watch(templatePath) }));\n                using var stream = _themeBlobProvider.OpenRead(templatePath);\n                return stream.ReadToString();\n            });\n        }\n\n        private string GetSettingsFilePath()\n        {\n            var prefix = _httpContextAccessor.HttpContext.Request.Query[\"preview_mode\"];\n            return prefix.ToString().IsNullOrEmpty() ? \"settings_data.json\" : $\"drafts\\\\{prefix}_settings_data.json\";\n        }\n\n        public bool IsFeatureActive(string featureName)\n        {\n            var cacheKey = CacheKey.With(GetType(), nameof(IsFeatureActive), featureName);\n\n            return _memoryCache.GetOrCreateExclusive(cacheKey, cacheEntry =>\n            {\n                var changeToken = ThemeEngineCacheRegion.CreateChangeToken();\n                var watchChangeToken = _themeBlobProvider.Watch(CurrentThemeSettingPath);\n                var tokens = new[]\n                           {\n                               changeToken, watchChangeToken\n                           };\n                var compositeChangeToken = new CompositeChangeToken(tokens);\n                cacheEntry.AddExpirationToken(compositeChangeToken);\n\n                var settingJObject = InnerGetAllSettings(_themeBlobProvider, CurrentThemeSettingPath);\n                var result = _featuresAgent.IsActive(featureName, settingJObject);\n                return result;\n            });\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/ThemeEngineCacheRegion.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common.Caching;\n\nnamespace VirtoCommerce.LiquidThemeEngine\n{\n    public class ThemeEngineCacheRegion : CancellableCacheRegion<ThemeEngineCacheRegion>\n    {\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.LiquidThemeEngine/VirtoCommerce.LiquidThemeEngine.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\n  <PropertyGroup>\n    <TargetFramework>net8.0</TargetFramework>\n    <Description>The storefront implementation of the Virto Commerce platform.</Description>\n    <PackageLicenseUrl>https://virtocommerce.com/open-source-license</PackageLicenseUrl>\n    <PackageProjectUrl>https://github.com/VirtoCommerce/vc-storefront-core</PackageProjectUrl>\n    <PackageIconUrl>https://virtocommerce.com/themes/assets/logo.jpg</PackageIconUrl>\n    <RepositoryUrl>https://github.com/VirtoCommerce/vc-storefront-core</RepositoryUrl>\n    <IsPackable>False</IsPackable>\n    <OutputType>Library</OutputType>\n  </PropertyGroup>\n  <ItemGroup>\n    <FrameworkReference Include=\"Microsoft.AspNetCore.App\" />\n    <PackageReference Include=\"GraphQL.Client\" Version=\"6.0.3\" />\n    <PackageReference Include=\"LibSassHost\" Version=\"1.4.0\" />\n    <PackageReference Include=\"LibSassHost.Native.linux-x64\" Version=\"1.4.0\" />\n    <PackageReference Include=\"LibSassHost.Native.osx-x64\" Version=\"1.4.0\" />\n    <PackageReference Include=\"LibSassHost.Native.win-x64\" Version=\"1.4.0\" />\n    <PackageReference Include=\"LibSassHost.Native.win-x86\" Version=\"1.4.0\" />\n    <PackageReference Include=\"Nito.AsyncEx\" Version=\"5.1.2\" />\n    <PackageReference Include=\"PagedList.Core\" Version=\"1.17.4\" />\n    <PackageReference Include=\"Scriban\" Version=\"5.9.0\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\VirtoCommerce.Storefront.Model\\VirtoCommerce.Storefront.Model.csproj\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"Properties\\\" />\n    <Folder Include=\"Util\\\" />\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "VirtoCommerce.Storefront/.bowerrc",
    "content": "{\n  \"directory\": \"wwwroot/lib\"\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/AutoRestClients/!readme.txt",
    "content": "See there, how to generate AutoRest-generated clients with the Platform v.3:\nhttps://github.com/VirtoCommerce/vc-platform/blob/dev/docs/developer-guide/using-autorest-with-v3.md\n\nSimplest example to refresh all clients:\n\n$modules = @('Platform', 'Cart', 'Catalog', 'Content', 'Core', 'Customer', 'Inventory', 'Marketing', 'Notifications', 'Orders', 'Payment', 'Pricing', 'Shipping', 'Sitemaps', 'Store', 'Subscription', 'Tax')\n$modules.ForEach( { autoRest VirtoCommerce.Storefront\\AutoRestClients\\array-in-query-fix.yml --version=3.0.6274 --v3 --debug --input-file=http://localhost:10645/docs/VirtoCommerce.$_/swagger.json --output-folder=.\\VirtoCommerce.Storefront\\AutoRestClients --output-file=$_`ModuleApi.cs --namespace=VirtoCommerce.Storefront.AutoRestClients.$_`ModuleApi --override-client-name=$_`ModuleClient --add-credentials --csharp })\n\n"
  },
  {
    "path": "VirtoCommerce.Storefront/AutoRestClients/CatalogModuleApi.cs",
    "content": "// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class CatalogModuleClient : ServiceClient<CatalogModuleClient>, ICatalogModuleClient\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        public System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        public JsonSerializerSettings SerializationSettings { get; private set; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        public JsonSerializerSettings DeserializationSettings { get; private set; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client subscription.\n        /// </summary>\n        public ServiceClientCredentials Credentials { get; private set; }\n\n        /// <summary>\n        /// Gets the ICatalogModuleAssociations.\n        /// </summary>\n        public virtual ICatalogModuleAssociations CatalogModuleAssociations { get; private set; }\n\n        /// <summary>\n        /// Gets the ICatalogModuleCatalogs.\n        /// </summary>\n        public virtual ICatalogModuleCatalogs CatalogModuleCatalogs { get; private set; }\n\n        /// <summary>\n        /// Gets the ICatalogModuleCategories.\n        /// </summary>\n        public virtual ICatalogModuleCategories CatalogModuleCategories { get; private set; }\n\n        /// <summary>\n        /// Gets the ICatalogModuleIndexedSearch.\n        /// </summary>\n        public virtual ICatalogModuleIndexedSearch CatalogModuleIndexedSearch { get; private set; }\n\n        /// <summary>\n        /// Gets the ICatalogModuleListEntry.\n        /// </summary>\n        public virtual ICatalogModuleListEntry CatalogModuleListEntry { get; private set; }\n\n        /// <summary>\n        /// Gets the ICatalogModuleProducts.\n        /// </summary>\n        public virtual ICatalogModuleProducts CatalogModuleProducts { get; private set; }\n\n        /// <summary>\n        /// Gets the ICatalogModuleProperties.\n        /// </summary>\n        public virtual ICatalogModuleProperties CatalogModuleProperties { get; private set; }\n\n        /// <summary>\n        /// Gets the ICatalogModulePropertyDictionaryItems.\n        /// </summary>\n        public virtual ICatalogModulePropertyDictionaryItems CatalogModulePropertyDictionaryItems { get; private set; }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleClient class.\n        /// </summary>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling CatalogModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        protected CatalogModuleClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleClient class.\n        /// </summary>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected CatalogModuleClient(params DelegatingHandler[] handlers) : base(handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleClient class.\n        /// </summary>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected CatalogModuleClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected CatalogModuleClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected CatalogModuleClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CatalogModuleClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling CatalogModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CatalogModuleClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CatalogModuleClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CatalogModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CatalogModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// An optional partial-method to perform custom initialization.\n        ///</summary>\n        partial void CustomInitialize();\n        /// <summary>\n        /// Initializes client properties.\n        /// </summary>\n        private void Initialize()\n        {\n            CatalogModuleAssociations = new CatalogModuleAssociations(this);\n            CatalogModuleCatalogs = new CatalogModuleCatalogs(this);\n            CatalogModuleCategories = new CatalogModuleCategories(this);\n            CatalogModuleIndexedSearch = new CatalogModuleIndexedSearch(this);\n            CatalogModuleListEntry = new CatalogModuleListEntry(this);\n            CatalogModuleProducts = new CatalogModuleProducts(this);\n            CatalogModuleProperties = new CatalogModuleProperties(this);\n            CatalogModulePropertyDictionaryItems = new CatalogModulePropertyDictionaryItems(this);\n            BaseUri = new System.Uri(\"http://localhost\");\n            SerializationSettings = new JsonSerializerSettings\n            {\n                Formatting = Newtonsoft.Json.Formatting.Indented,\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new  List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            DeserializationSettings = new JsonSerializerSettings\n            {\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            CustomInitialize();\n        }\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// </summary>\n    public partial interface ICatalogModuleClient : System.IDisposable\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        JsonSerializerSettings SerializationSettings { get; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        JsonSerializerSettings DeserializationSettings { get; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client\n        /// subscription.\n        /// </summary>\n        ServiceClientCredentials Credentials { get; }\n\n\n        /// <summary>\n        /// Gets the ICatalogModuleAssociations.\n        /// </summary>\n        ICatalogModuleAssociations CatalogModuleAssociations { get; }\n\n        /// <summary>\n        /// Gets the ICatalogModuleCatalogs.\n        /// </summary>\n        ICatalogModuleCatalogs CatalogModuleCatalogs { get; }\n\n        /// <summary>\n        /// Gets the ICatalogModuleCategories.\n        /// </summary>\n        ICatalogModuleCategories CatalogModuleCategories { get; }\n\n        /// <summary>\n        /// Gets the ICatalogModuleIndexedSearch.\n        /// </summary>\n        ICatalogModuleIndexedSearch CatalogModuleIndexedSearch { get; }\n\n        /// <summary>\n        /// Gets the ICatalogModuleListEntry.\n        /// </summary>\n        ICatalogModuleListEntry CatalogModuleListEntry { get; }\n\n        /// <summary>\n        /// Gets the ICatalogModuleProducts.\n        /// </summary>\n        ICatalogModuleProducts CatalogModuleProducts { get; }\n\n        /// <summary>\n        /// Gets the ICatalogModuleProperties.\n        /// </summary>\n        ICatalogModuleProperties CatalogModuleProperties { get; }\n\n        /// <summary>\n        /// Gets the ICatalogModulePropertyDictionaryItems.\n        /// </summary>\n        ICatalogModulePropertyDictionaryItems CatalogModulePropertyDictionaryItems { get; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModuleAssociations operations.\n    /// </summary>\n    public partial class CatalogModuleAssociations : IServiceOperations<CatalogModuleClient>, ICatalogModuleAssociations\n    {\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleAssociations class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CatalogModuleAssociations(CatalogModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the CatalogModuleClient\n        /// </summary>\n        public CatalogModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Returns list of associations for specified product\n        /// </summary>\n        /// <remarks>\n        /// Returns list of associations for specified product\n        /// </remarks>\n        /// <param name='productId'>\n        /// Owner product id\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<ProductAssociation>>> GetAllAssociationsWithHttpMessagesAsync(string productId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (productId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"productId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"productId\", productId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetAllAssociations\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/products/associations/{productId}\").ToString();\n            _url = _url.Replace(\"{productId}\", System.Uri.EscapeDataString(productId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<ProductAssociation>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<ProductAssociation>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Updates the specified association\n        /// </summary>\n        /// <remarks>\n        /// Updates the specified association\n        /// </remarks>\n        /// <param name='body'>\n        /// The association\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UpdateAssociationsWithHttpMessagesAsync(IList<ProductAssociation> body = default(IList<ProductAssociation>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdateAssociations\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/products/associations\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Deletes specified associations\n        /// </summary>\n        /// <remarks>\n        /// Updates the specified association\n        /// </remarks>\n        /// <param name='ids'>\n        /// associations to delete ids\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"Delete\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/products/associations\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Join(\",\", ids))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Returns associations by search criteria\n        /// </summary>\n        /// <remarks>\n        /// Returns associations by search criteria\n        /// </remarks>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ProductAssociationSearchResult>> SearchWithHttpMessagesAsync(ProductAssociationSearchCriteria body = default(ProductAssociationSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"Search\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/products/associations/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ProductAssociationSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ProductAssociationSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModuleAssociations operations.\n    /// </summary>\n    public partial interface ICatalogModuleAssociations\n    {\n        /// <summary>\n        /// Returns list of associations for specified product\n        /// </summary>\n        /// <remarks>\n        /// Returns list of associations for specified product\n        /// </remarks>\n        /// <param name='productId'>\n        /// Owner product id\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<IList<ProductAssociation>>> GetAllAssociationsWithHttpMessagesAsync(string productId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Updates the specified association\n        /// </summary>\n        /// <remarks>\n        /// Updates the specified association\n        /// </remarks>\n        /// <param name='body'>\n        /// The association\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> UpdateAssociationsWithHttpMessagesAsync(IList<ProductAssociation> body = default(IList<ProductAssociation>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Deletes specified associations\n        /// </summary>\n        /// <remarks>\n        /// Updates the specified association\n        /// </remarks>\n        /// <param name='ids'>\n        /// associations to delete ids\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeleteWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Returns associations by search criteria\n        /// </summary>\n        /// <remarks>\n        /// Returns associations by search criteria\n        /// </remarks>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<ProductAssociationSearchResult>> SearchWithHttpMessagesAsync(ProductAssociationSearchCriteria body = default(ProductAssociationSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for CatalogModuleAssociations.\n    /// </summary>\n    public static partial class CatalogModuleAssociationsExtensions\n    {\n            /// <summary>\n            /// Returns list of associations for specified product\n            /// </summary>\n            /// <remarks>\n            /// Returns list of associations for specified product\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='productId'>\n            /// Owner product id\n            /// </param>\n            public static IList<ProductAssociation> GetAllAssociations(this ICatalogModuleAssociations operations, string productId)\n            {\n                return operations.GetAllAssociationsAsync(productId).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Returns list of associations for specified product\n            /// </summary>\n            /// <remarks>\n            /// Returns list of associations for specified product\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='productId'>\n            /// Owner product id\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<ProductAssociation>> GetAllAssociationsAsync(this ICatalogModuleAssociations operations, string productId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetAllAssociationsWithHttpMessagesAsync(productId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Updates the specified association\n            /// </summary>\n            /// <remarks>\n            /// Updates the specified association\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The association\n            /// </param>\n            public static void UpdateAssociations(this ICatalogModuleAssociations operations, IList<ProductAssociation> body = default(IList<ProductAssociation>))\n            {\n                operations.UpdateAssociationsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Updates the specified association\n            /// </summary>\n            /// <remarks>\n            /// Updates the specified association\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The association\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UpdateAssociationsAsync(this ICatalogModuleAssociations operations, IList<ProductAssociation> body = default(IList<ProductAssociation>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UpdateAssociationsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Deletes specified associations\n            /// </summary>\n            /// <remarks>\n            /// Updates the specified association\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// associations to delete ids\n            /// </param>\n            public static void Delete(this ICatalogModuleAssociations operations, IList<string> ids = default(IList<string>))\n            {\n                operations.DeleteAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Deletes specified associations\n            /// </summary>\n            /// <remarks>\n            /// Updates the specified association\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// associations to delete ids\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteAsync(this ICatalogModuleAssociations operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Returns associations by search criteria\n            /// </summary>\n            /// <remarks>\n            /// Returns associations by search criteria\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static ProductAssociationSearchResult Search(this ICatalogModuleAssociations operations, ProductAssociationSearchCriteria body = default(ProductAssociationSearchCriteria))\n            {\n                return operations.SearchAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Returns associations by search criteria\n            /// </summary>\n            /// <remarks>\n            /// Returns associations by search criteria\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ProductAssociationSearchResult> SearchAsync(this ICatalogModuleAssociations operations, ProductAssociationSearchCriteria body = default(ProductAssociationSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModuleCatalogs operations.\n    /// </summary>\n    public partial class CatalogModuleCatalogs : IServiceOperations<CatalogModuleClient>, ICatalogModuleCatalogs\n    {\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleCatalogs class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CatalogModuleCatalogs(CatalogModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the CatalogModuleClient\n        /// </summary>\n        public CatalogModuleClient Client { get; private set; }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<CatalogSearchResult>> SearchCatalogsWithHttpMessagesAsync(CatalogSearchCriteria body = default(CatalogSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchCatalogs\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/catalogs/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<CatalogSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<CatalogSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Gets Catalog by id.\n        /// </summary>\n        /// <remarks>\n        /// Gets Catalog by id with full information loaded\n        /// </remarks>\n        /// <param name='id'>\n        /// The Catalog id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Catalog>> GetCatalogWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetCatalog\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/catalogs/{id}\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Catalog>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Catalog>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Deletes catalog by id.\n        /// </summary>\n        /// <remarks>\n        /// Deletes catalog by id\n        /// </remarks>\n        /// <param name='id'>\n        /// Catalog id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteCatalogWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteCatalog\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/catalogs/{id}\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Gets the template for a new catalog.\n        /// </summary>\n        /// <remarks>\n        /// Gets the template for a new common catalog\n        /// </remarks>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Catalog>> GetNewCatalogWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetNewCatalog\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/catalogs/getnew\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Catalog>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Catalog>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Gets the template for a new virtual catalog.\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Catalog>> GetNewVirtualCatalogWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetNewVirtualCatalog\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/catalogs/getnewvirtual\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Catalog>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Catalog>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Creates the specified catalog.\n        /// </summary>\n        /// <remarks>\n        /// Creates the specified catalog\n        /// </remarks>\n        /// <param name='body'>\n        /// The catalog to create\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Catalog>> CreateCatalogWithHttpMessagesAsync(Catalog body = default(Catalog), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CreateCatalog\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/catalogs\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Catalog>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Catalog>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Updates the specified catalog.\n        /// </summary>\n        /// <remarks>\n        /// Updates the specified catalog.\n        /// </remarks>\n        /// <param name='body'>\n        /// The catalog.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UpdateCatalogWithHttpMessagesAsync(Catalog body = default(Catalog), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdateCatalog\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/catalogs\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModuleCatalogs operations.\n    /// </summary>\n    public partial interface ICatalogModuleCatalogs\n    {\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<CatalogSearchResult>> SearchCatalogsWithHttpMessagesAsync(CatalogSearchCriteria body = default(CatalogSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Gets Catalog by id.\n        /// </summary>\n        /// <remarks>\n        /// Gets Catalog by id with full information loaded\n        /// </remarks>\n        /// <param name='id'>\n        /// The Catalog id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Catalog>> GetCatalogWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Deletes catalog by id.\n        /// </summary>\n        /// <remarks>\n        /// Deletes catalog by id\n        /// </remarks>\n        /// <param name='id'>\n        /// Catalog id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse> DeleteCatalogWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Gets the template for a new catalog.\n        /// </summary>\n        /// <remarks>\n        /// Gets the template for a new common catalog\n        /// </remarks>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<Catalog>> GetNewCatalogWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Gets the template for a new virtual catalog.\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<Catalog>> GetNewVirtualCatalogWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Creates the specified catalog.\n        /// </summary>\n        /// <remarks>\n        /// Creates the specified catalog\n        /// </remarks>\n        /// <param name='body'>\n        /// The catalog to create\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<Catalog>> CreateCatalogWithHttpMessagesAsync(Catalog body = default(Catalog), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Updates the specified catalog.\n        /// </summary>\n        /// <remarks>\n        /// Updates the specified catalog.\n        /// </remarks>\n        /// <param name='body'>\n        /// The catalog.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> UpdateCatalogWithHttpMessagesAsync(Catalog body = default(Catalog), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for CatalogModuleCatalogs.\n    /// </summary>\n    public static partial class CatalogModuleCatalogsExtensions\n    {\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static CatalogSearchResult SearchCatalogs(this ICatalogModuleCatalogs operations, CatalogSearchCriteria body = default(CatalogSearchCriteria))\n            {\n                return operations.SearchCatalogsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<CatalogSearchResult> SearchCatalogsAsync(this ICatalogModuleCatalogs operations, CatalogSearchCriteria body = default(CatalogSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchCatalogsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Gets Catalog by id.\n            /// </summary>\n            /// <remarks>\n            /// Gets Catalog by id with full information loaded\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// The Catalog id.\n            /// </param>\n            public static Catalog GetCatalog(this ICatalogModuleCatalogs operations, string id)\n            {\n                return operations.GetCatalogAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets Catalog by id.\n            /// </summary>\n            /// <remarks>\n            /// Gets Catalog by id with full information loaded\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// The Catalog id.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Catalog> GetCatalogAsync(this ICatalogModuleCatalogs operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetCatalogWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Deletes catalog by id.\n            /// </summary>\n            /// <remarks>\n            /// Deletes catalog by id\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Catalog id.\n            /// </param>\n            public static void DeleteCatalog(this ICatalogModuleCatalogs operations, string id)\n            {\n                operations.DeleteCatalogAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Deletes catalog by id.\n            /// </summary>\n            /// <remarks>\n            /// Deletes catalog by id\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Catalog id.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteCatalogAsync(this ICatalogModuleCatalogs operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteCatalogWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Gets the template for a new catalog.\n            /// </summary>\n            /// <remarks>\n            /// Gets the template for a new common catalog\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static Catalog GetNewCatalog(this ICatalogModuleCatalogs operations)\n            {\n                return operations.GetNewCatalogAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets the template for a new catalog.\n            /// </summary>\n            /// <remarks>\n            /// Gets the template for a new common catalog\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Catalog> GetNewCatalogAsync(this ICatalogModuleCatalogs operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetNewCatalogWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Gets the template for a new virtual catalog.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static Catalog GetNewVirtualCatalog(this ICatalogModuleCatalogs operations)\n            {\n                return operations.GetNewVirtualCatalogAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets the template for a new virtual catalog.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Catalog> GetNewVirtualCatalogAsync(this ICatalogModuleCatalogs operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetNewVirtualCatalogWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Creates the specified catalog.\n            /// </summary>\n            /// <remarks>\n            /// Creates the specified catalog\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The catalog to create\n            /// </param>\n            public static Catalog CreateCatalog(this ICatalogModuleCatalogs operations, Catalog body = default(Catalog))\n            {\n                return operations.CreateCatalogAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Creates the specified catalog.\n            /// </summary>\n            /// <remarks>\n            /// Creates the specified catalog\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The catalog to create\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Catalog> CreateCatalogAsync(this ICatalogModuleCatalogs operations, Catalog body = default(Catalog), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.CreateCatalogWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Updates the specified catalog.\n            /// </summary>\n            /// <remarks>\n            /// Updates the specified catalog.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The catalog.\n            /// </param>\n            public static void UpdateCatalog(this ICatalogModuleCatalogs operations, Catalog body = default(Catalog))\n            {\n                operations.UpdateCatalogAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Updates the specified catalog.\n            /// </summary>\n            /// <remarks>\n            /// Updates the specified catalog.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The catalog.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UpdateCatalogAsync(this ICatalogModuleCatalogs operations, Catalog body = default(Catalog), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UpdateCatalogWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModuleCategories operations.\n    /// </summary>\n    public partial class CatalogModuleCategories : IServiceOperations<CatalogModuleClient>, ICatalogModuleCategories\n    {\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleCategories class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CatalogModuleCategories(CatalogModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the CatalogModuleClient\n        /// </summary>\n        public CatalogModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Gets category by id.\n        /// </summary>\n        /// <param name='id'>\n        /// Category id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Category>> GetCategoryWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetCategory\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/categories/{id}\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Category>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Category>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Gets categories by ids\n        /// </summary>\n        /// <param name='ids'>\n        /// Categories ids\n        /// </param>\n        /// <param name='respGroup'>\n        /// Response group.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Category>>> GetCategoriesByIdsAsyncWithHttpMessagesAsync(IList<string> ids = default(IList<string>), string respGroup = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"respGroup\", respGroup);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetCategoriesByIdsAsync\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/categories\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                if (ids.Count == 0)\n                {\n                    _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Empty)));\n                }\n                else\n                {\n                    foreach (var _item in ids)\n                    {\n                        _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(\"\" + _item)));\n                    }\n                }\n            }\n            if (respGroup != null)\n            {\n                _queryParameters.Add(string.Format(\"respGroup={0}\", System.Uri.EscapeDataString(respGroup)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Category>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Category>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Creates or updates the specified category.\n        /// </summary>\n        /// <remarks>\n        /// If category.id is null, a new category is created. It's updated otherwise\n        /// </remarks>\n        /// <param name='body'>\n        /// The category.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> CreateOrUpdateCategoryWithHttpMessagesAsync(Category body = default(Category), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CreateOrUpdateCategory\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/categories\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Deletes the specified categories by id.\n        /// </summary>\n        /// <param name='ids'>\n        /// The categories ids.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteCategoryWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteCategory\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/categories\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Join(\",\", ids))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get categories by plenty ids\n        /// </summary>\n        /// <param name='body'>\n        /// Categories ids\n        /// </param>\n        /// <param name='respGroup'>\n        /// Response group\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Category>>> GetCategoriesByPlentyIdsWithHttpMessagesAsync(IList<string> body = default(IList<string>), string respGroup = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"respGroup\", respGroup);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetCategoriesByPlentyIds\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/categories/plenty\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (respGroup != null)\n            {\n                _queryParameters.Add(string.Format(\"respGroup={0}\", System.Uri.EscapeDataString(respGroup)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Category>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Category>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Gets the template for a new category.\n        /// </summary>\n        /// <param name='catalogId'>\n        /// The catalog id.\n        /// </param>\n        /// <param name='parentCategoryId'>\n        /// The parent category id. (Optional)\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Category>> GetNewCategoryWithHttpMessagesAsync(string catalogId, string parentCategoryId = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (catalogId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"catalogId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"catalogId\", catalogId);\n                tracingParameters.Add(\"parentCategoryId\", parentCategoryId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetNewCategory\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/{catalogId}/categories/newcategory\").ToString();\n            _url = _url.Replace(\"{catalogId}\", System.Uri.EscapeDataString(catalogId));\n            List<string> _queryParameters = new List<string>();\n            if (parentCategoryId != null)\n            {\n                _queryParameters.Add(string.Format(\"parentCategoryId={0}\", System.Uri.EscapeDataString(parentCategoryId)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Category>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Category>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModuleCategories operations.\n    /// </summary>\n    public partial interface ICatalogModuleCategories\n    {\n        /// <summary>\n        /// Gets category by id.\n        /// </summary>\n        /// <param name='id'>\n        /// Category id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Category>> GetCategoryWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Gets categories by ids\n        /// </summary>\n        /// <param name='ids'>\n        /// Categories ids\n        /// </param>\n        /// <param name='respGroup'>\n        /// Response group.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Category>>> GetCategoriesByIdsAsyncWithHttpMessagesAsync(IList<string> ids = default(IList<string>), string respGroup = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Creates or updates the specified category.\n        /// </summary>\n        /// <remarks>\n        /// If category.id is null, a new category is created. It's updated\n        /// otherwise\n        /// </remarks>\n        /// <param name='body'>\n        /// The category.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> CreateOrUpdateCategoryWithHttpMessagesAsync(Category body = default(Category), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Deletes the specified categories by id.\n        /// </summary>\n        /// <param name='ids'>\n        /// The categories ids.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeleteCategoryWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get categories by plenty ids\n        /// </summary>\n        /// <param name='body'>\n        /// Categories ids\n        /// </param>\n        /// <param name='respGroup'>\n        /// Response group\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Category>>> GetCategoriesByPlentyIdsWithHttpMessagesAsync(IList<string> body = default(IList<string>), string respGroup = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Gets the template for a new category.\n        /// </summary>\n        /// <param name='catalogId'>\n        /// The catalog id.\n        /// </param>\n        /// <param name='parentCategoryId'>\n        /// The parent category id. (Optional)\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Category>> GetNewCategoryWithHttpMessagesAsync(string catalogId, string parentCategoryId = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for CatalogModuleCategories.\n    /// </summary>\n    public static partial class CatalogModuleCategoriesExtensions\n    {\n            /// <summary>\n            /// Gets category by id.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Category id.\n            /// </param>\n            public static Category GetCategory(this ICatalogModuleCategories operations, string id)\n            {\n                return operations.GetCategoryAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets category by id.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Category id.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Category> GetCategoryAsync(this ICatalogModuleCategories operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetCategoryWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Gets categories by ids\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// Categories ids\n            /// </param>\n            /// <param name='respGroup'>\n            /// Response group.\n            /// </param>\n            public static IList<Category> GetCategoriesByIdsAsync(this ICatalogModuleCategories operations, IList<string> ids = default(IList<string>), string respGroup = default(string))\n            {\n                return operations.GetCategoriesByIdsAsyncAsync(ids, respGroup).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets categories by ids\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// Categories ids\n            /// </param>\n            /// <param name='respGroup'>\n            /// Response group.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Category>> GetCategoriesByIdsAsyncAsync(this ICatalogModuleCategories operations, IList<string> ids = default(IList<string>), string respGroup = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetCategoriesByIdsAsyncWithHttpMessagesAsync(ids, respGroup, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Creates or updates the specified category.\n            /// </summary>\n            /// <remarks>\n            /// If category.id is null, a new category is created. It's updated otherwise\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The category.\n            /// </param>\n            public static void CreateOrUpdateCategory(this ICatalogModuleCategories operations, Category body = default(Category))\n            {\n                operations.CreateOrUpdateCategoryAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Creates or updates the specified category.\n            /// </summary>\n            /// <remarks>\n            /// If category.id is null, a new category is created. It's updated otherwise\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The category.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task CreateOrUpdateCategoryAsync(this ICatalogModuleCategories operations, Category body = default(Category), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.CreateOrUpdateCategoryWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Deletes the specified categories by id.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// The categories ids.\n            /// </param>\n            public static void DeleteCategory(this ICatalogModuleCategories operations, IList<string> ids = default(IList<string>))\n            {\n                operations.DeleteCategoryAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Deletes the specified categories by id.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// The categories ids.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteCategoryAsync(this ICatalogModuleCategories operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteCategoryWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Get categories by plenty ids\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Categories ids\n            /// </param>\n            /// <param name='respGroup'>\n            /// Response group\n            /// </param>\n            public static IList<Category> GetCategoriesByPlentyIds(this ICatalogModuleCategories operations, IList<string> body = default(IList<string>), string respGroup = default(string))\n            {\n                return operations.GetCategoriesByPlentyIdsAsync(body, respGroup).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get categories by plenty ids\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Categories ids\n            /// </param>\n            /// <param name='respGroup'>\n            /// Response group\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Category>> GetCategoriesByPlentyIdsAsync(this ICatalogModuleCategories operations, IList<string> body = default(IList<string>), string respGroup = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetCategoriesByPlentyIdsWithHttpMessagesAsync(body, respGroup, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Gets the template for a new category.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='catalogId'>\n            /// The catalog id.\n            /// </param>\n            /// <param name='parentCategoryId'>\n            /// The parent category id. (Optional)\n            /// </param>\n            public static Category GetNewCategory(this ICatalogModuleCategories operations, string catalogId, string parentCategoryId = default(string))\n            {\n                return operations.GetNewCategoryAsync(catalogId, parentCategoryId).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets the template for a new category.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='catalogId'>\n            /// The catalog id.\n            /// </param>\n            /// <param name='parentCategoryId'>\n            /// The parent category id. (Optional)\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Category> GetNewCategoryAsync(this ICatalogModuleCategories operations, string catalogId, string parentCategoryId = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetNewCategoryWithHttpMessagesAsync(catalogId, parentCategoryId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModuleIndexedSearch operations.\n    /// </summary>\n    public partial class CatalogModuleIndexedSearch : IServiceOperations<CatalogModuleClient>, ICatalogModuleIndexedSearch\n    {\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleIndexedSearch class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CatalogModuleIndexedSearch(CatalogModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the CatalogModuleClient\n        /// </summary>\n        public CatalogModuleClient Client { get; private set; }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ProductIndexedSearchResult>> SearchProductsWithHttpMessagesAsync(ProductIndexedSearchCriteria body = default(ProductIndexedSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchProducts\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/search/products\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ProductIndexedSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ProductIndexedSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<CategoryIndexedSearchResult>> SearchCategoriesWithHttpMessagesAsync(CategoryIndexedSearchCriteria body = default(CategoryIndexedSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchCategories\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/search/categories\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<CategoryIndexedSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<CategoryIndexedSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModuleIndexedSearch operations.\n    /// </summary>\n    public partial interface ICatalogModuleIndexedSearch\n    {\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<ProductIndexedSearchResult>> SearchProductsWithHttpMessagesAsync(ProductIndexedSearchCriteria body = default(ProductIndexedSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<CategoryIndexedSearchResult>> SearchCategoriesWithHttpMessagesAsync(CategoryIndexedSearchCriteria body = default(CategoryIndexedSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for CatalogModuleIndexedSearch.\n    /// </summary>\n    public static partial class CatalogModuleIndexedSearchExtensions\n    {\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static ProductIndexedSearchResult SearchProducts(this ICatalogModuleIndexedSearch operations, ProductIndexedSearchCriteria body = default(ProductIndexedSearchCriteria))\n            {\n                return operations.SearchProductsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ProductIndexedSearchResult> SearchProductsAsync(this ICatalogModuleIndexedSearch operations, ProductIndexedSearchCriteria body = default(ProductIndexedSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchProductsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static CategoryIndexedSearchResult SearchCategories(this ICatalogModuleIndexedSearch operations, CategoryIndexedSearchCriteria body = default(CategoryIndexedSearchCriteria))\n            {\n                return operations.SearchCategoriesAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<CategoryIndexedSearchResult> SearchCategoriesAsync(this ICatalogModuleIndexedSearch operations, CategoryIndexedSearchCriteria body = default(CategoryIndexedSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchCategoriesWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModuleListEntry operations.\n    /// </summary>\n    public partial class CatalogModuleListEntry : IServiceOperations<CatalogModuleClient>, ICatalogModuleListEntry\n    {\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleListEntry class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CatalogModuleListEntry(CatalogModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the CatalogModuleClient\n        /// </summary>\n        public CatalogModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Searches for the items by complex criteria.\n        /// </summary>\n        /// <param name='body'>\n        /// The search criteria.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ListEntrySearchResult>> ListItemsSearchAsyncWithHttpMessagesAsync(CatalogListEntrySearchCriteria body = default(CatalogListEntrySearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ListItemsSearchAsync\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/listentries\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ListEntrySearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ListEntrySearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Creates links for categories or items to parent categories and catalogs.\n        /// </summary>\n        /// <param name='body'>\n        /// The links.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> CreateLinksWithHttpMessagesAsync(IList<CategoryLink> body = default(IList<CategoryLink>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CreateLinks\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/listentrylinks\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Bulk create links to categories and items\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> BulkCreateLinksWithHttpMessagesAsync(BulkLinkCreationRequest body = default(BulkLinkCreationRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"BulkCreateLinks\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/listentrylinks/bulkcreate\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Unlinks the linked categories or items from parent categories and catalogs.\n        /// </summary>\n        /// <param name='body'>\n        /// The links.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteLinksWithHttpMessagesAsync(IList<CategoryLink> body = default(IList<CategoryLink>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteLinks\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/listentrylinks/delete\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Move categories or products to another location.\n        /// </summary>\n        /// <param name='body'>\n        /// Move operation request\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> MoveWithHttpMessagesAsync(ListEntriesMoveRequest body = default(ListEntriesMoveRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"Move\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/listentries/move\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModuleListEntry operations.\n    /// </summary>\n    public partial interface ICatalogModuleListEntry\n    {\n        /// <summary>\n        /// Searches for the items by complex criteria.\n        /// </summary>\n        /// <param name='body'>\n        /// The search criteria.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<ListEntrySearchResult>> ListItemsSearchAsyncWithHttpMessagesAsync(CatalogListEntrySearchCriteria body = default(CatalogListEntrySearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Creates links for categories or items to parent categories and\n        /// catalogs.\n        /// </summary>\n        /// <param name='body'>\n        /// The links.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> CreateLinksWithHttpMessagesAsync(IList<CategoryLink> body = default(IList<CategoryLink>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Bulk create links to categories and items\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> BulkCreateLinksWithHttpMessagesAsync(BulkLinkCreationRequest body = default(BulkLinkCreationRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Unlinks the linked categories or items from parent categories and\n        /// catalogs.\n        /// </summary>\n        /// <param name='body'>\n        /// The links.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeleteLinksWithHttpMessagesAsync(IList<CategoryLink> body = default(IList<CategoryLink>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Move categories or products to another location.\n        /// </summary>\n        /// <param name='body'>\n        /// Move operation request\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> MoveWithHttpMessagesAsync(ListEntriesMoveRequest body = default(ListEntriesMoveRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for CatalogModuleListEntry.\n    /// </summary>\n    public static partial class CatalogModuleListEntryExtensions\n    {\n            /// <summary>\n            /// Searches for the items by complex criteria.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The search criteria.\n            /// </param>\n            public static ListEntrySearchResult ListItemsSearchAsync(this ICatalogModuleListEntry operations, CatalogListEntrySearchCriteria body = default(CatalogListEntrySearchCriteria))\n            {\n                return operations.ListItemsSearchAsyncAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Searches for the items by complex criteria.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The search criteria.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ListEntrySearchResult> ListItemsSearchAsyncAsync(this ICatalogModuleListEntry operations, CatalogListEntrySearchCriteria body = default(CatalogListEntrySearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.ListItemsSearchAsyncWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Creates links for categories or items to parent categories and catalogs.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The links.\n            /// </param>\n            public static void CreateLinks(this ICatalogModuleListEntry operations, IList<CategoryLink> body = default(IList<CategoryLink>))\n            {\n                operations.CreateLinksAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Creates links for categories or items to parent categories and catalogs.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The links.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task CreateLinksAsync(this ICatalogModuleListEntry operations, IList<CategoryLink> body = default(IList<CategoryLink>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.CreateLinksWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Bulk create links to categories and items\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void BulkCreateLinks(this ICatalogModuleListEntry operations, BulkLinkCreationRequest body = default(BulkLinkCreationRequest))\n            {\n                operations.BulkCreateLinksAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Bulk create links to categories and items\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task BulkCreateLinksAsync(this ICatalogModuleListEntry operations, BulkLinkCreationRequest body = default(BulkLinkCreationRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.BulkCreateLinksWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Unlinks the linked categories or items from parent categories and catalogs.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The links.\n            /// </param>\n            public static void DeleteLinks(this ICatalogModuleListEntry operations, IList<CategoryLink> body = default(IList<CategoryLink>))\n            {\n                operations.DeleteLinksAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Unlinks the linked categories or items from parent categories and catalogs.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The links.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteLinksAsync(this ICatalogModuleListEntry operations, IList<CategoryLink> body = default(IList<CategoryLink>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteLinksWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Move categories or products to another location.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Move operation request\n            /// </param>\n            public static void Move(this ICatalogModuleListEntry operations, ListEntriesMoveRequest body = default(ListEntriesMoveRequest))\n            {\n                operations.MoveAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Move categories or products to another location.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Move operation request\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task MoveAsync(this ICatalogModuleListEntry operations, ListEntriesMoveRequest body = default(ListEntriesMoveRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.MoveWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModuleProducts operations.\n    /// </summary>\n    public partial class CatalogModuleProducts : IServiceOperations<CatalogModuleClient>, ICatalogModuleProducts\n    {\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleProducts class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CatalogModuleProducts(CatalogModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the CatalogModuleClient\n        /// </summary>\n        public CatalogModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Gets product by id.\n        /// </summary>\n        /// <param name='id'>\n        /// Item id.\n        /// </param>\n        /// <param name='respGroup'>\n        /// Response group.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<CatalogProduct>> GetProductByIdWithHttpMessagesAsync(string id, string respGroup = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"respGroup\", respGroup);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetProductById\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/products/{id}\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            List<string> _queryParameters = new List<string>();\n            if (respGroup != null)\n            {\n                _queryParameters.Add(string.Format(\"respGroup={0}\", System.Uri.EscapeDataString(respGroup)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<CatalogProduct>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<CatalogProduct>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Gets products by ids\n        /// </summary>\n        /// <param name='ids'>\n        /// Item ids\n        /// </param>\n        /// <param name='respGroup'>\n        /// Response group.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<CatalogProduct>>> GetProductByIdsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), string respGroup = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"respGroup\", respGroup);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetProductByIds\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/products\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                if (ids.Count == 0)\n                {\n                    _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Empty)));\n                }\n                else\n                {\n                    foreach (var _item in ids)\n                    {\n                        _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(\"\" + _item)));\n                    }\n                }\n            }\n            if (respGroup != null)\n            {\n                _queryParameters.Add(string.Format(\"respGroup={0}\", System.Uri.EscapeDataString(respGroup)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<CatalogProduct>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<CatalogProduct>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Create/Update the specified product.\n        /// </summary>\n        /// <param name='body'>\n        /// The product.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<CatalogProduct>> SaveProductWithHttpMessagesAsync(CatalogProduct body = default(CatalogProduct), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SaveProduct\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/products\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<CatalogProduct>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<CatalogProduct>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Deletes the specified items by id.\n        /// </summary>\n        /// <param name='ids'>\n        /// The items ids.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteProductWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteProduct\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/products\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Join(\",\", ids))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Gets products by plenty ids\n        /// </summary>\n        /// <param name='body'>\n        /// Item ids\n        /// </param>\n        /// <param name='respGroup'>\n        /// Response group.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<CatalogProduct>>> GetProductByPlentyIdsWithHttpMessagesAsync(IList<string> body = default(IList<string>), string respGroup = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"respGroup\", respGroup);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetProductByPlentyIds\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/products/plenty\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (respGroup != null)\n            {\n                _queryParameters.Add(string.Format(\"respGroup={0}\", System.Uri.EscapeDataString(respGroup)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<CatalogProduct>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<CatalogProduct>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Gets the template for a new product (outside of category).\n        /// </summary>\n        /// <remarks>\n        /// Use when need to create item belonging to catalog directly.\n        /// </remarks>\n        /// <param name='catalogId'>\n        /// The catalog id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<CatalogProduct>> GetNewProductByCatalogWithHttpMessagesAsync(string catalogId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (catalogId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"catalogId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"catalogId\", catalogId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetNewProductByCatalog\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/{catalogId}/products/getnew\").ToString();\n            _url = _url.Replace(\"{catalogId}\", System.Uri.EscapeDataString(catalogId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<CatalogProduct>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<CatalogProduct>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Gets the template for a new product (inside category).\n        /// </summary>\n        /// <remarks>\n        /// Use when need to create item belonging to catalog category.\n        /// </remarks>\n        /// <param name='catalogId'>\n        /// The catalog id.\n        /// </param>\n        /// <param name='categoryId'>\n        /// The category id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<CatalogProduct>> GetNewProductByCatalogAndCategoryWithHttpMessagesAsync(string catalogId, string categoryId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (catalogId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"catalogId\");\n            }\n            if (categoryId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"categoryId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"catalogId\", catalogId);\n                tracingParameters.Add(\"categoryId\", categoryId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetNewProductByCatalogAndCategory\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/{catalogId}/categories/{categoryId}/products/getnew\").ToString();\n            _url = _url.Replace(\"{catalogId}\", System.Uri.EscapeDataString(catalogId));\n            _url = _url.Replace(\"{categoryId}\", System.Uri.EscapeDataString(categoryId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<CatalogProduct>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<CatalogProduct>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Gets the template for a new variation.\n        /// </summary>\n        /// <param name='productId'>\n        /// The parent product id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<CatalogProduct>> GetNewVariationWithHttpMessagesAsync(string productId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (productId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"productId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"productId\", productId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetNewVariation\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/products/{productId}/getnewvariation\").ToString();\n            _url = _url.Replace(\"{productId}\", System.Uri.EscapeDataString(productId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<CatalogProduct>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<CatalogProduct>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='productId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<CatalogProduct>> CloneProductWithHttpMessagesAsync(string productId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (productId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"productId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"productId\", productId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CloneProduct\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/products/{productId}/clone\").ToString();\n            _url = _url.Replace(\"{productId}\", System.Uri.EscapeDataString(productId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<CatalogProduct>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<CatalogProduct>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Create/Update the specified products.\n        /// </summary>\n        /// <param name='body'>\n        /// The products.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> SaveProductsWithHttpMessagesAsync(IList<CatalogProduct> body = default(IList<CatalogProduct>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SaveProducts\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/products/batch\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModuleProducts operations.\n    /// </summary>\n    public partial interface ICatalogModuleProducts\n    {\n        /// <summary>\n        /// Gets product by id.\n        /// </summary>\n        /// <param name='id'>\n        /// Item id.\n        /// </param>\n        /// <param name='respGroup'>\n        /// Response group.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<CatalogProduct>> GetProductByIdWithHttpMessagesAsync(string id, string respGroup = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Gets products by ids\n        /// </summary>\n        /// <param name='ids'>\n        /// Item ids\n        /// </param>\n        /// <param name='respGroup'>\n        /// Response group.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<CatalogProduct>>> GetProductByIdsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), string respGroup = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Create/Update the specified product.\n        /// </summary>\n        /// <param name='body'>\n        /// The product.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<CatalogProduct>> SaveProductWithHttpMessagesAsync(CatalogProduct body = default(CatalogProduct), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Deletes the specified items by id.\n        /// </summary>\n        /// <param name='ids'>\n        /// The items ids.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeleteProductWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Gets products by plenty ids\n        /// </summary>\n        /// <param name='body'>\n        /// Item ids\n        /// </param>\n        /// <param name='respGroup'>\n        /// Response group.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<CatalogProduct>>> GetProductByPlentyIdsWithHttpMessagesAsync(IList<string> body = default(IList<string>), string respGroup = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Gets the template for a new product (outside of category).\n        /// </summary>\n        /// <remarks>\n        /// Use when need to create item belonging to catalog directly.\n        /// </remarks>\n        /// <param name='catalogId'>\n        /// The catalog id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<CatalogProduct>> GetNewProductByCatalogWithHttpMessagesAsync(string catalogId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Gets the template for a new product (inside category).\n        /// </summary>\n        /// <remarks>\n        /// Use when need to create item belonging to catalog category.\n        /// </remarks>\n        /// <param name='catalogId'>\n        /// The catalog id.\n        /// </param>\n        /// <param name='categoryId'>\n        /// The category id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<CatalogProduct>> GetNewProductByCatalogAndCategoryWithHttpMessagesAsync(string catalogId, string categoryId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Gets the template for a new variation.\n        /// </summary>\n        /// <param name='productId'>\n        /// The parent product id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<CatalogProduct>> GetNewVariationWithHttpMessagesAsync(string productId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='productId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<CatalogProduct>> CloneProductWithHttpMessagesAsync(string productId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Create/Update the specified products.\n        /// </summary>\n        /// <param name='body'>\n        /// The products.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> SaveProductsWithHttpMessagesAsync(IList<CatalogProduct> body = default(IList<CatalogProduct>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for CatalogModuleProducts.\n    /// </summary>\n    public static partial class CatalogModuleProductsExtensions\n    {\n            /// <summary>\n            /// Gets product by id.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Item id.\n            /// </param>\n            /// <param name='respGroup'>\n            /// Response group.\n            /// </param>\n            public static CatalogProduct GetProductById(this ICatalogModuleProducts operations, string id, string respGroup = default(string))\n            {\n                return operations.GetProductByIdAsync(id, respGroup).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets product by id.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Item id.\n            /// </param>\n            /// <param name='respGroup'>\n            /// Response group.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<CatalogProduct> GetProductByIdAsync(this ICatalogModuleProducts operations, string id, string respGroup = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetProductByIdWithHttpMessagesAsync(id, respGroup, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Gets products by ids\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// Item ids\n            /// </param>\n            /// <param name='respGroup'>\n            /// Response group.\n            /// </param>\n            public static IList<CatalogProduct> GetProductByIds(this ICatalogModuleProducts operations, IList<string> ids = default(IList<string>), string respGroup = default(string))\n            {\n                return operations.GetProductByIdsAsync(ids, respGroup).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets products by ids\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// Item ids\n            /// </param>\n            /// <param name='respGroup'>\n            /// Response group.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<CatalogProduct>> GetProductByIdsAsync(this ICatalogModuleProducts operations, IList<string> ids = default(IList<string>), string respGroup = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetProductByIdsWithHttpMessagesAsync(ids, respGroup, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Create/Update the specified product.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The product.\n            /// </param>\n            public static CatalogProduct SaveProduct(this ICatalogModuleProducts operations, CatalogProduct body = default(CatalogProduct))\n            {\n                return operations.SaveProductAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Create/Update the specified product.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The product.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<CatalogProduct> SaveProductAsync(this ICatalogModuleProducts operations, CatalogProduct body = default(CatalogProduct), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SaveProductWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Deletes the specified items by id.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// The items ids.\n            /// </param>\n            public static void DeleteProduct(this ICatalogModuleProducts operations, IList<string> ids = default(IList<string>))\n            {\n                operations.DeleteProductAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Deletes the specified items by id.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// The items ids.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteProductAsync(this ICatalogModuleProducts operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteProductWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Gets products by plenty ids\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Item ids\n            /// </param>\n            /// <param name='respGroup'>\n            /// Response group.\n            /// </param>\n            public static IList<CatalogProduct> GetProductByPlentyIds(this ICatalogModuleProducts operations, IList<string> body = default(IList<string>), string respGroup = default(string))\n            {\n                return operations.GetProductByPlentyIdsAsync(body, respGroup).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets products by plenty ids\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Item ids\n            /// </param>\n            /// <param name='respGroup'>\n            /// Response group.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<CatalogProduct>> GetProductByPlentyIdsAsync(this ICatalogModuleProducts operations, IList<string> body = default(IList<string>), string respGroup = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetProductByPlentyIdsWithHttpMessagesAsync(body, respGroup, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Gets the template for a new product (outside of category).\n            /// </summary>\n            /// <remarks>\n            /// Use when need to create item belonging to catalog directly.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='catalogId'>\n            /// The catalog id.\n            /// </param>\n            public static CatalogProduct GetNewProductByCatalog(this ICatalogModuleProducts operations, string catalogId)\n            {\n                return operations.GetNewProductByCatalogAsync(catalogId).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets the template for a new product (outside of category).\n            /// </summary>\n            /// <remarks>\n            /// Use when need to create item belonging to catalog directly.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='catalogId'>\n            /// The catalog id.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<CatalogProduct> GetNewProductByCatalogAsync(this ICatalogModuleProducts operations, string catalogId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetNewProductByCatalogWithHttpMessagesAsync(catalogId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Gets the template for a new product (inside category).\n            /// </summary>\n            /// <remarks>\n            /// Use when need to create item belonging to catalog category.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='catalogId'>\n            /// The catalog id.\n            /// </param>\n            /// <param name='categoryId'>\n            /// The category id.\n            /// </param>\n            public static CatalogProduct GetNewProductByCatalogAndCategory(this ICatalogModuleProducts operations, string catalogId, string categoryId)\n            {\n                return operations.GetNewProductByCatalogAndCategoryAsync(catalogId, categoryId).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets the template for a new product (inside category).\n            /// </summary>\n            /// <remarks>\n            /// Use when need to create item belonging to catalog category.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='catalogId'>\n            /// The catalog id.\n            /// </param>\n            /// <param name='categoryId'>\n            /// The category id.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<CatalogProduct> GetNewProductByCatalogAndCategoryAsync(this ICatalogModuleProducts operations, string catalogId, string categoryId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetNewProductByCatalogAndCategoryWithHttpMessagesAsync(catalogId, categoryId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Gets the template for a new variation.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='productId'>\n            /// The parent product id.\n            /// </param>\n            public static CatalogProduct GetNewVariation(this ICatalogModuleProducts operations, string productId)\n            {\n                return operations.GetNewVariationAsync(productId).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets the template for a new variation.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='productId'>\n            /// The parent product id.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<CatalogProduct> GetNewVariationAsync(this ICatalogModuleProducts operations, string productId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetNewVariationWithHttpMessagesAsync(productId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='productId'>\n            /// </param>\n            public static CatalogProduct CloneProduct(this ICatalogModuleProducts operations, string productId)\n            {\n                return operations.CloneProductAsync(productId).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='productId'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<CatalogProduct> CloneProductAsync(this ICatalogModuleProducts operations, string productId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.CloneProductWithHttpMessagesAsync(productId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Create/Update the specified products.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The products.\n            /// </param>\n            public static void SaveProducts(this ICatalogModuleProducts operations, IList<CatalogProduct> body = default(IList<CatalogProduct>))\n            {\n                operations.SaveProductsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Create/Update the specified products.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The products.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task SaveProductsAsync(this ICatalogModuleProducts operations, IList<CatalogProduct> body = default(IList<CatalogProduct>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.SaveProductsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModuleProperties operations.\n    /// </summary>\n    public partial class CatalogModuleProperties : IServiceOperations<CatalogModuleClient>, ICatalogModuleProperties\n    {\n        /// <summary>\n        /// Initializes a new instance of the CatalogModuleProperties class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CatalogModuleProperties(CatalogModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the CatalogModuleClient\n        /// </summary>\n        public CatalogModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Gets property metainformation by id.\n        /// </summary>\n        /// <param name='propertyId'>\n        /// The property id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Property>> GetPropertyWithHttpMessagesAsync(string propertyId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (propertyId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"propertyId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"propertyId\", propertyId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetProperty\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/properties/{propertyId}\").ToString();\n            _url = _url.Replace(\"{propertyId}\", System.Uri.EscapeDataString(propertyId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Property>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Property>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Gets the template for a new catalog property.\n        /// </summary>\n        /// <param name='catalogId'>\n        /// The catalog id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Property>> GetNewCatalogPropertyWithHttpMessagesAsync(string catalogId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (catalogId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"catalogId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"catalogId\", catalogId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetNewCatalogProperty\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/{catalogId}/properties/getnew\").ToString();\n            _url = _url.Replace(\"{catalogId}\", System.Uri.EscapeDataString(catalogId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Property>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Property>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Gets the template for a new category property.\n        /// </summary>\n        /// <param name='categoryId'>\n        /// The category id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Property>> GetNewCategoryPropertyWithHttpMessagesAsync(string categoryId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (categoryId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"categoryId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"categoryId\", categoryId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetNewCategoryProperty\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/categories/{categoryId}/properties/getnew\").ToString();\n            _url = _url.Replace(\"{categoryId}\", System.Uri.EscapeDataString(categoryId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Property>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Property>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Creates or updates the specified property.\n        /// </summary>\n        /// <remarks>\n        /// If property.IsNew == True, a new property is created. It's updated\n        /// otherwise\n        /// </remarks>\n        /// <param name='body'>\n        /// The property.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> SavePropertyWithHttpMessagesAsync(Property body = default(Property), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SaveProperty\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/properties\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Deletes property by id.\n        /// </summary>\n        /// <param name='id'>\n        /// The property id.\n        /// </param>\n        /// <param name='doDeleteValues'>\n        /// Flag indicating to remove property values from objects as well\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeletePropertyWithHttpMessagesAsync(string id = default(string), bool? doDeleteValues = false, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"doDeleteValues\", doDeleteValues);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteProperty\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/properties\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (id != null)\n            {\n                _queryParameters.Add(string.Format(\"id={0}\", System.Uri.EscapeDataString(id)));\n            }\n            if (doDeleteValues != null)\n            {\n                _queryParameters.Add(string.Format(\"doDeleteValues={0}\", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(doDeleteValues, Client.SerializationSettings).Trim('\"'))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModuleProperties operations.\n    /// </summary>\n    public partial interface ICatalogModuleProperties\n    {\n        /// <summary>\n        /// Gets property metainformation by id.\n        /// </summary>\n        /// <param name='propertyId'>\n        /// The property id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Property>> GetPropertyWithHttpMessagesAsync(string propertyId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Gets the template for a new catalog property.\n        /// </summary>\n        /// <param name='catalogId'>\n        /// The catalog id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Property>> GetNewCatalogPropertyWithHttpMessagesAsync(string catalogId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Gets the template for a new category property.\n        /// </summary>\n        /// <param name='categoryId'>\n        /// The category id.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Property>> GetNewCategoryPropertyWithHttpMessagesAsync(string categoryId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Creates or updates the specified property.\n        /// </summary>\n        /// <remarks>\n        /// If property.IsNew == True, a new property is created. It's updated\n        /// otherwise\n        /// </remarks>\n        /// <param name='body'>\n        /// The property.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> SavePropertyWithHttpMessagesAsync(Property body = default(Property), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Deletes property by id.\n        /// </summary>\n        /// <param name='id'>\n        /// The property id.\n        /// </param>\n        /// <param name='doDeleteValues'>\n        /// Flag indicating to remove property values from objects as well\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeletePropertyWithHttpMessagesAsync(string id = default(string), bool? doDeleteValues = false, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for CatalogModuleProperties.\n    /// </summary>\n    public static partial class CatalogModulePropertiesExtensions\n    {\n            /// <summary>\n            /// Gets property metainformation by id.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='propertyId'>\n            /// The property id.\n            /// </param>\n            public static Property GetProperty(this ICatalogModuleProperties operations, string propertyId)\n            {\n                return operations.GetPropertyAsync(propertyId).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets property metainformation by id.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='propertyId'>\n            /// The property id.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Property> GetPropertyAsync(this ICatalogModuleProperties operations, string propertyId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetPropertyWithHttpMessagesAsync(propertyId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Gets the template for a new catalog property.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='catalogId'>\n            /// The catalog id.\n            /// </param>\n            public static Property GetNewCatalogProperty(this ICatalogModuleProperties operations, string catalogId)\n            {\n                return operations.GetNewCatalogPropertyAsync(catalogId).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets the template for a new catalog property.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='catalogId'>\n            /// The catalog id.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Property> GetNewCatalogPropertyAsync(this ICatalogModuleProperties operations, string catalogId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetNewCatalogPropertyWithHttpMessagesAsync(catalogId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Gets the template for a new category property.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='categoryId'>\n            /// The category id.\n            /// </param>\n            public static Property GetNewCategoryProperty(this ICatalogModuleProperties operations, string categoryId)\n            {\n                return operations.GetNewCategoryPropertyAsync(categoryId).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets the template for a new category property.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='categoryId'>\n            /// The category id.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Property> GetNewCategoryPropertyAsync(this ICatalogModuleProperties operations, string categoryId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetNewCategoryPropertyWithHttpMessagesAsync(categoryId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Creates or updates the specified property.\n            /// </summary>\n            /// <remarks>\n            /// If property.IsNew == True, a new property is created. It's updated\n            /// otherwise\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The property.\n            /// </param>\n            public static void SaveProperty(this ICatalogModuleProperties operations, Property body = default(Property))\n            {\n                operations.SavePropertyAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Creates or updates the specified property.\n            /// </summary>\n            /// <remarks>\n            /// If property.IsNew == True, a new property is created. It's updated\n            /// otherwise\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The property.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task SavePropertyAsync(this ICatalogModuleProperties operations, Property body = default(Property), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.SavePropertyWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Deletes property by id.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// The property id.\n            /// </param>\n            /// <param name='doDeleteValues'>\n            /// Flag indicating to remove property values from objects as well\n            /// </param>\n            public static void DeleteProperty(this ICatalogModuleProperties operations, string id = default(string), bool? doDeleteValues = false)\n            {\n                operations.DeletePropertyAsync(id, doDeleteValues).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Deletes property by id.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// The property id.\n            /// </param>\n            /// <param name='doDeleteValues'>\n            /// Flag indicating to remove property values from objects as well\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeletePropertyAsync(this ICatalogModuleProperties operations, string id = default(string), bool? doDeleteValues = false, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeletePropertyWithHttpMessagesAsync(id, doDeleteValues, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModulePropertyDictionaryItems operations.\n    /// </summary>\n    public partial class CatalogModulePropertyDictionaryItems : IServiceOperations<CatalogModuleClient>, ICatalogModulePropertyDictionaryItems\n    {\n        /// <summary>\n        /// Initializes a new instance of the CatalogModulePropertyDictionaryItems class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CatalogModulePropertyDictionaryItems(CatalogModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the CatalogModuleClient\n        /// </summary>\n        public CatalogModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Search property dictionary items\n        /// </summary>\n        /// <param name='body'>\n        /// The search criteria\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<PropertyDictionaryItem>>> SearchPropertyDictionaryItemsWithHttpMessagesAsync(PropertyDictionaryItemSearchCriteria body = default(PropertyDictionaryItemSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchPropertyDictionaryItems\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/dictionaryitems/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<PropertyDictionaryItem>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<PropertyDictionaryItem>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Creates or updates the specified property dictionary items\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> SaveChangesWithHttpMessagesAsync(IList<PropertyDictionaryItem> body = default(IList<PropertyDictionaryItem>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SaveChanges\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/dictionaryitems\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Delete property dictionary items by ids\n        /// </summary>\n        /// <param name='ids'>\n        /// The identifiers of objects that needed to be deleted\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeletePropertyDictionaryItemsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeletePropertyDictionaryItems\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/catalog/dictionaryitems\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Join(\",\", ids))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CatalogModulePropertyDictionaryItems operations.\n    /// </summary>\n    public partial interface ICatalogModulePropertyDictionaryItems\n    {\n        /// <summary>\n        /// Search property dictionary items\n        /// </summary>\n        /// <param name='body'>\n        /// The search criteria\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<PropertyDictionaryItem>>> SearchPropertyDictionaryItemsWithHttpMessagesAsync(PropertyDictionaryItemSearchCriteria body = default(PropertyDictionaryItemSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Creates or updates the specified property dictionary items\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> SaveChangesWithHttpMessagesAsync(IList<PropertyDictionaryItem> body = default(IList<PropertyDictionaryItem>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Delete property dictionary items by ids\n        /// </summary>\n        /// <param name='ids'>\n        /// The identifiers of objects that needed to be deleted\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeletePropertyDictionaryItemsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for CatalogModulePropertyDictionaryItems.\n    /// </summary>\n    public static partial class CatalogModulePropertyDictionaryItemsExtensions\n    {\n            /// <summary>\n            /// Search property dictionary items\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The search criteria\n            /// </param>\n            public static IList<PropertyDictionaryItem> SearchPropertyDictionaryItems(this ICatalogModulePropertyDictionaryItems operations, PropertyDictionaryItemSearchCriteria body = default(PropertyDictionaryItemSearchCriteria))\n            {\n                return operations.SearchPropertyDictionaryItemsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Search property dictionary items\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// The search criteria\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<PropertyDictionaryItem>> SearchPropertyDictionaryItemsAsync(this ICatalogModulePropertyDictionaryItems operations, PropertyDictionaryItemSearchCriteria body = default(PropertyDictionaryItemSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchPropertyDictionaryItemsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Creates or updates the specified property dictionary items\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void SaveChanges(this ICatalogModulePropertyDictionaryItems operations, IList<PropertyDictionaryItem> body = default(IList<PropertyDictionaryItem>))\n            {\n                operations.SaveChangesAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Creates or updates the specified property dictionary items\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task SaveChangesAsync(this ICatalogModulePropertyDictionaryItems operations, IList<PropertyDictionaryItem> body = default(IList<PropertyDictionaryItem>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.SaveChangesWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Delete property dictionary items by ids\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// The identifiers of objects that needed to be deleted\n            /// </param>\n            public static void DeletePropertyDictionaryItems(this ICatalogModulePropertyDictionaryItems operations, IList<string> ids = default(IList<string>))\n            {\n                operations.DeletePropertyDictionaryItemsAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Delete property dictionary items by ids\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// The identifiers of objects that needed to be deleted\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeletePropertyDictionaryItemsAsync(this ICatalogModulePropertyDictionaryItems operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeletePropertyDictionaryItemsWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SeoInfo\n    {\n        /// <summary>\n        /// Initializes a new instance of the SeoInfo class.\n        /// </summary>\n        public SeoInfo()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SeoInfo class.\n        /// </summary>\n        /// <param name=\"semanticUrl\">Slug</param>\n        /// <param name=\"pageTitle\">head title tag content</param>\n        /// <param name=\"metaDescription\">&lt;meta name=\"description\"\n        /// /&gt;</param>\n        /// <param name=\"metaKeywords\">&lt;meta name=\"keywords\" /&gt;</param>\n        /// <param name=\"storeId\">Tenant StoreId which SEO defined</param>\n        /// <param name=\"objectId\">SEO related object id</param>\n        /// <param name=\"objectType\">SEO related object type name</param>\n        /// <param name=\"isActive\">Active/Inactive</param>\n        public SeoInfo(string name = default(string), string semanticUrl = default(string), string pageTitle = default(string), string metaDescription = default(string), string imageAltDescription = default(string), string metaKeywords = default(string), string storeId = default(string), string objectId = default(string), string objectType = default(string), bool? isActive = default(bool?), string languageCode = default(string), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Name = name;\n            SemanticUrl = semanticUrl;\n            PageTitle = pageTitle;\n            MetaDescription = metaDescription;\n            ImageAltDescription = imageAltDescription;\n            MetaKeywords = metaKeywords;\n            StoreId = storeId;\n            ObjectId = objectId;\n            ObjectType = objectType;\n            IsActive = isActive;\n            LanguageCode = languageCode;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Gets or sets slug\n        /// </summary>\n        [JsonProperty(PropertyName = \"semanticUrl\")]\n        public string SemanticUrl { get; set; }\n\n        /// <summary>\n        /// Gets or sets head title tag content\n        /// </summary>\n        [JsonProperty(PropertyName = \"pageTitle\")]\n        public string PageTitle { get; set; }\n\n        /// <summary>\n        /// Gets or sets &amp;lt;meta name=\"description\" /&amp;gt;\n        /// </summary>\n        [JsonProperty(PropertyName = \"metaDescription\")]\n        public string MetaDescription { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"imageAltDescription\")]\n        public string ImageAltDescription { get; set; }\n\n        /// <summary>\n        /// Gets or sets &amp;lt;meta name=\"keywords\" /&amp;gt;\n        /// </summary>\n        [JsonProperty(PropertyName = \"metaKeywords\")]\n        public string MetaKeywords { get; set; }\n\n        /// <summary>\n        /// Gets or sets tenant StoreId which SEO defined\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeId\")]\n        public string StoreId { get; set; }\n\n        /// <summary>\n        /// Gets or sets SEO related object id\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// Gets or sets SEO related object type name\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// Gets or sets active/Inactive\n        /// </summary>\n        [JsonProperty(PropertyName = \"isActive\")]\n        public bool? IsActive { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Image\n    {\n        /// <summary>\n        /// Initializes a new instance of the Image class.\n        /// </summary>\n        public Image()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Image class.\n        /// </summary>\n        /// <param name=\"typeId\">Gets or sets the asset type\n        /// identifier.</param>\n        /// <param name=\"group\">Gets or sets the asset group name.</param>\n        /// <param name=\"name\">Gets or sets the asset name.</param>\n        /// <param name=\"languageCode\">Gets or sets the asset language.</param>\n        /// <param name=\"isInherited\">System flag used to mark that object was\n        /// inherited from other</param>\n        public Image(int? sortOrder = default(int?), byte[] binaryData = default(byte[]), string relativeUrl = default(string), string url = default(string), string typeId = default(string), string group = default(string), string name = default(string), string outerId = default(string), string languageCode = default(string), bool? isInherited = default(bool?), string seoObjectType = default(string), IList<SeoInfo> seoInfos = default(IList<SeoInfo>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            SortOrder = sortOrder;\n            BinaryData = binaryData;\n            RelativeUrl = relativeUrl;\n            Url = url;\n            TypeId = typeId;\n            Group = group;\n            Name = name;\n            OuterId = outerId;\n            LanguageCode = languageCode;\n            IsInherited = isInherited;\n            SeoObjectType = seoObjectType;\n            SeoInfos = seoInfos;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortOrder\")]\n        public int? SortOrder { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"binaryData\")]\n        public byte[] BinaryData { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"relativeUrl\")]\n        public string RelativeUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"url\")]\n        public string Url { get; set; }\n\n        /// <summary>\n        /// Gets or sets the asset type identifier.\n        /// </summary>\n        [JsonProperty(PropertyName = \"typeId\")]\n        public string TypeId { get; set; }\n\n        /// <summary>\n        /// Gets or sets the asset group name.\n        /// </summary>\n        [JsonProperty(PropertyName = \"group\")]\n        public string Group { get; set; }\n\n        /// <summary>\n        /// Gets or sets the asset name.\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// Gets or sets the asset language.\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// Gets system flag used to mark that object was inherited from other\n        /// </summary>\n        [JsonProperty(PropertyName = \"isInherited\")]\n        public bool? IsInherited { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoObjectType\")]\n        public string SeoObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoInfos\")]\n        public IList<SeoInfo> SeoInfos { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ProductAssociation\n    {\n        /// <summary>\n        /// Initializes a new instance of the ProductAssociation class.\n        /// </summary>\n        public ProductAssociation()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ProductAssociation class.\n        /// </summary>\n        /// <param name=\"type\">Association type (Accessories, Up-Sales,\n        /// Cross-Sales, Related etc)</param>\n        /// <param name=\"itemId\">Is a primary key of associating object</param>\n        /// <param name=\"associatedObjectId\">Each link element can have an\n        /// associated object like Product, Category, etc.\n        /// Is a primary key of associated object</param>\n        /// <param name=\"associatedObjectType\">Associated object type :\n        /// 'product', 'category' etc</param>\n        /// <param name=\"associatedObjectName\">Display name for associated\n        /// object</param>\n        /// <param name=\"associatedObjectImg\">Associated object image\n        /// URL</param>\n        public ProductAssociation(string type = default(string), int? priority = default(int?), int? quantity = default(int?), string itemId = default(string), string associatedObjectId = default(string), string associatedObjectType = default(string), string outerId = default(string), string associatedObjectName = default(string), string associatedObjectImg = default(string), IList<string> tags = default(IList<string>), string imgSrc = default(string), IList<Image> images = default(IList<Image>), string id = default(string))\n        {\n            Type = type;\n            Priority = priority;\n            Quantity = quantity;\n            ItemId = itemId;\n            AssociatedObjectId = associatedObjectId;\n            AssociatedObjectType = associatedObjectType;\n            OuterId = outerId;\n            AssociatedObjectName = associatedObjectName;\n            AssociatedObjectImg = associatedObjectImg;\n            Tags = tags;\n            ImgSrc = imgSrc;\n            Images = images;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets association type (Accessories, Up-Sales, Cross-Sales,\n        /// Related etc)\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"priority\")]\n        public int? Priority { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"quantity\")]\n        public int? Quantity { get; set; }\n\n        /// <summary>\n        /// Gets or sets is a primary key of associating object\n        /// </summary>\n        [JsonProperty(PropertyName = \"itemId\")]\n        public string ItemId { get; set; }\n\n        /// <summary>\n        /// Gets or sets each link element can have an associated object like\n        /// Product, Category, etc.\n        /// Is a primary key of associated object\n        /// </summary>\n        [JsonProperty(PropertyName = \"associatedObjectId\")]\n        public string AssociatedObjectId { get; set; }\n\n        /// <summary>\n        /// Gets or sets associated object type : 'product', 'category' etc\n        /// </summary>\n        [JsonProperty(PropertyName = \"associatedObjectType\")]\n        public string AssociatedObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// Gets display name for associated object\n        /// </summary>\n        [JsonProperty(PropertyName = \"associatedObjectName\")]\n        public string AssociatedObjectName { get; private set; }\n\n        /// <summary>\n        /// Gets associated object image URL\n        /// </summary>\n        [JsonProperty(PropertyName = \"associatedObjectImg\")]\n        public string AssociatedObjectImg { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"tags\")]\n        public IList<string> Tags { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"imgSrc\")]\n        public string ImgSrc { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"images\")]\n        public IList<Image> Images { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class PropertyValue\n    {\n        /// <summary>\n        /// Initializes a new instance of the PropertyValue class.\n        /// </summary>\n        public PropertyValue()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PropertyValue class.\n        /// </summary>\n        /// <param name=\"valueType\">Possible values include: 'ShortText',\n        /// 'LongText', 'Number', 'DateTime', 'Boolean', 'Integer',\n        /// 'GeoPoint'</param>\n        public PropertyValue(string propertyName = default(string), string propertyId = default(string), string languageCode = default(string), string alias = default(string), string valueType = default(string), string valueId = default(string), object value = default(object), bool? propertyMultivalue = default(bool?), string outerId = default(string), bool? isInherited = default(bool?), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            PropertyName = propertyName;\n            PropertyId = propertyId;\n            LanguageCode = languageCode;\n            Alias = alias;\n            ValueType = valueType;\n            ValueId = valueId;\n            Value = value;\n            PropertyMultivalue = propertyMultivalue;\n            OuterId = outerId;\n            IsInherited = isInherited;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyName\")]\n        public string PropertyName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyId\")]\n        public string PropertyId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"alias\")]\n        public string Alias { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'ShortText', 'LongText',\n        /// 'Number', 'DateTime', 'Boolean', 'Integer', 'GeoPoint'\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueType\")]\n        public string ValueType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueId\")]\n        public string ValueId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"value\")]\n        public object Value { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyMultivalue\")]\n        public bool? PropertyMultivalue { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isInherited\")]\n        public bool? IsInherited { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class PropertyAttribute\n    {\n        /// <summary>\n        /// Initializes a new instance of the PropertyAttribute class.\n        /// </summary>\n        public PropertyAttribute()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PropertyAttribute class.\n        /// </summary>\n        public PropertyAttribute(string propertyId = default(string), string value = default(string), string name = default(string), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            PropertyId = propertyId;\n            Value = value;\n            Name = name;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyId\")]\n        public string PropertyId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"value\")]\n        public string Value { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class PropertyDisplayName\n    {\n        /// <summary>\n        /// Initializes a new instance of the PropertyDisplayName class.\n        /// </summary>\n        public PropertyDisplayName()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PropertyDisplayName class.\n        /// </summary>\n        public PropertyDisplayName(string name = default(string), string languageCode = default(string))\n        {\n            Name = name;\n            LanguageCode = languageCode;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Represents property validation rules definition\n    /// </summary>\n    public partial class PropertyValidationRule\n    {\n        /// <summary>\n        /// Initializes a new instance of the PropertyValidationRule class.\n        /// </summary>\n        public PropertyValidationRule()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PropertyValidationRule class.\n        /// </summary>\n        /// <param name=\"isUnique\">Uniquie value flag constrain</param>\n        /// <param name=\"charCountMin\">Down chars count border or null if no\n        /// defined</param>\n        /// <param name=\"charCountMax\">Upper chars count border or null if no\n        /// defined</param>\n        /// <param name=\"regExp\">Custom regular expression</param>\n        public PropertyValidationRule(bool? isUnique = default(bool?), int? charCountMin = default(int?), int? charCountMax = default(int?), string regExp = default(string), string propertyId = default(string), string id = default(string))\n        {\n            IsUnique = isUnique;\n            CharCountMin = charCountMin;\n            CharCountMax = charCountMax;\n            RegExp = regExp;\n            PropertyId = propertyId;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets uniquie value flag constrain\n        /// </summary>\n        [JsonProperty(PropertyName = \"isUnique\")]\n        public bool? IsUnique { get; set; }\n\n        /// <summary>\n        /// Gets or sets down chars count border or null if no defined\n        /// </summary>\n        [JsonProperty(PropertyName = \"charCountMin\")]\n        public int? CharCountMin { get; set; }\n\n        /// <summary>\n        /// Gets or sets upper chars count border or null if no defined\n        /// </summary>\n        [JsonProperty(PropertyName = \"charCountMax\")]\n        public int? CharCountMax { get; set; }\n\n        /// <summary>\n        /// Gets or sets custom regular expression\n        /// </summary>\n        [JsonProperty(PropertyName = \"regExp\")]\n        public string RegExp { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyId\")]\n        public string PropertyId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Property\n    {\n        /// <summary>\n        /// Initializes a new instance of the Property class.\n        /// </summary>\n        public Property()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Property class.\n        /// </summary>\n        /// <param name=\"isReadOnly\">Gets or sets a value indicating whether\n        /// user can change property value.</param>\n        /// <param name=\"isManageable\">Gets or sets a value indicating whether\n        /// user can change property metadata or remove this property.</param>\n        /// <param name=\"isNew\">Gets or sets a value indicating whether this\n        /// instance is new. A new property should be created on server site\n        /// instead of trying to update it.</param>\n        /// <param name=\"catalogId\">Gets or sets the catalog id that this\n        /// product belongs to.</param>\n        /// <param name=\"categoryId\">Gets or sets the category id that this\n        /// product belongs to.</param>\n        /// <param name=\"hidden\">Gets or sets a value indicating whether this\n        /// VirtoCommerce.CatalogModule.Core.Model.Property is hidden.</param>\n        /// <param name=\"valueType\">Possible values include: 'ShortText',\n        /// 'LongText', 'Number', 'DateTime', 'Boolean', 'Integer',\n        /// 'GeoPoint'</param>\n        /// <param name=\"type\">Possible values include: 'Product', 'Variation',\n        /// 'Category', 'Catalog'</param>\n        public Property(bool? isReadOnly = default(bool?), bool? isManageable = default(bool?), bool? isNew = default(bool?), string catalogId = default(string), string categoryId = default(string), string name = default(string), bool? required = default(bool?), bool? dictionary = default(bool?), bool? multivalue = default(bool?), bool? multilanguage = default(bool?), bool? hidden = default(bool?), string valueType = default(string), string type = default(string), string outerId = default(string), IList<PropertyValue> values = default(IList<PropertyValue>), IList<PropertyAttribute> attributes = default(IList<PropertyAttribute>), IList<PropertyDisplayName> displayNames = default(IList<PropertyDisplayName>), IList<PropertyValidationRule> validationRules = default(IList<PropertyValidationRule>), PropertyValidationRule validationRule = default(PropertyValidationRule), bool? isInherited = default(bool?), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            IsReadOnly = isReadOnly;\n            IsManageable = isManageable;\n            IsNew = isNew;\n            CatalogId = catalogId;\n            CategoryId = categoryId;\n            Name = name;\n            Required = required;\n            Dictionary = dictionary;\n            Multivalue = multivalue;\n            Multilanguage = multilanguage;\n            Hidden = hidden;\n            ValueType = valueType;\n            Type = type;\n            OuterId = outerId;\n            Values = values;\n            Attributes = attributes;\n            DisplayNames = displayNames;\n            ValidationRules = validationRules;\n            ValidationRule = validationRule;\n            IsInherited = isInherited;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets a value indicating whether user can change property\n        /// value.\n        /// </summary>\n        [JsonProperty(PropertyName = \"isReadOnly\")]\n        public bool? IsReadOnly { get; set; }\n\n        /// <summary>\n        /// Gets or sets a value indicating whether user can change property\n        /// metadata or remove this property.\n        /// </summary>\n        [JsonProperty(PropertyName = \"isManageable\")]\n        public bool? IsManageable { get; private set; }\n\n        /// <summary>\n        /// Gets or sets a value indicating whether this instance is new. A new\n        /// property should be created on server site instead of trying to\n        /// update it.\n        /// </summary>\n        [JsonProperty(PropertyName = \"isNew\")]\n        public bool? IsNew { get; set; }\n\n        /// <summary>\n        /// Gets or sets the catalog id that this product belongs to.\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogId\")]\n        public string CatalogId { get; set; }\n\n        /// <summary>\n        /// Gets or sets the category id that this product belongs to.\n        /// </summary>\n        [JsonProperty(PropertyName = \"categoryId\")]\n        public string CategoryId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"required\")]\n        public bool? Required { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"dictionary\")]\n        public bool? Dictionary { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"multivalue\")]\n        public bool? Multivalue { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"multilanguage\")]\n        public bool? Multilanguage { get; set; }\n\n        /// <summary>\n        /// Gets or sets a value indicating whether this\n        /// VirtoCommerce.CatalogModule.Core.Model.Property is hidden.\n        /// </summary>\n        [JsonProperty(PropertyName = \"hidden\")]\n        public bool? Hidden { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'ShortText', 'LongText',\n        /// 'Number', 'DateTime', 'Boolean', 'Integer', 'GeoPoint'\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueType\")]\n        public string ValueType { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Product', 'Variation',\n        /// 'Category', 'Catalog'\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"values\")]\n        public IList<PropertyValue> Values { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"attributes\")]\n        public IList<PropertyAttribute> Attributes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayNames\")]\n        public IList<PropertyDisplayName> DisplayNames { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"validationRules\")]\n        public IList<PropertyValidationRule> ValidationRules { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"validationRule\")]\n        public PropertyValidationRule ValidationRule { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isInherited\")]\n        public bool? IsInherited { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class CategoryLink\n    {\n        /// <summary>\n        /// Initializes a new instance of the CategoryLink class.\n        /// </summary>\n        public CategoryLink()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CategoryLink class.\n        /// </summary>\n        /// <param name=\"entryId\">Entry identifier which this link belongs\n        /// to</param>\n        /// <param name=\"listEntryType\">Gets or sets the type of the list\n        /// entry. E.g. \"product\", \"category\"</param>\n        /// <param name=\"priority\">Product order position in virtual\n        /// catalog</param>\n        public CategoryLink(string entryId = default(string), string listEntryId = default(string), string listEntryType = default(string), int? priority = default(int?), string catalogId = default(string), string categoryId = default(string), Category category = default(Category))\n        {\n            EntryId = entryId;\n            ListEntryId = listEntryId;\n            ListEntryType = listEntryType;\n            Priority = priority;\n            CatalogId = catalogId;\n            CategoryId = categoryId;\n            Category = category;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets entry identifier which this link belongs to\n        /// </summary>\n        [JsonProperty(PropertyName = \"entryId\")]\n        public string EntryId { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"listEntryId\")]\n        public string ListEntryId { get; set; }\n\n        /// <summary>\n        /// Gets or sets the type of the list entry. E.g. \"product\", \"category\"\n        /// </summary>\n        [JsonProperty(PropertyName = \"listEntryType\")]\n        public string ListEntryType { get; set; }\n\n        /// <summary>\n        /// Gets or sets product order position in virtual catalog\n        /// </summary>\n        [JsonProperty(PropertyName = \"priority\")]\n        public int? Priority { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogId\")]\n        public string CatalogId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"categoryId\")]\n        public string CategoryId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"category\")]\n        public Category Category { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Represents one outline element: catalog, category or product.\n    /// </summary>\n    public partial class OutlineItem\n    {\n        /// <summary>\n        /// Initializes a new instance of the OutlineItem class.\n        /// </summary>\n        public OutlineItem()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the OutlineItem class.\n        /// </summary>\n        /// <param name=\"id\">Object id</param>\n        /// <param name=\"seoObjectType\">Object type</param>\n        /// <param name=\"seoInfos\">All SEO records for the object</param>\n        /// <param name=\"name\">The name of current item</param>\n        /// <param name=\"hasVirtualParent\">True when this object is linked to\n        /// the virtual parent.</param>\n        public OutlineItem(string id = default(string), string seoObjectType = default(string), IList<SeoInfo> seoInfos = default(IList<SeoInfo>), string name = default(string), bool? hasVirtualParent = default(bool?))\n        {\n            Id = id;\n            SeoObjectType = seoObjectType;\n            SeoInfos = seoInfos;\n            Name = name;\n            HasVirtualParent = hasVirtualParent;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets object id\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n        /// <summary>\n        /// Gets or sets object type\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoObjectType\")]\n        public string SeoObjectType { get; set; }\n\n        /// <summary>\n        /// Gets or sets all SEO records for the object\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoInfos\")]\n        public IList<SeoInfo> SeoInfos { get; set; }\n\n        /// <summary>\n        /// Gets or sets the name of current item\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Gets or sets true when this object is linked to the virtual parent.\n        /// </summary>\n        [JsonProperty(PropertyName = \"hasVirtualParent\")]\n        public bool? HasVirtualParent { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Represents the path from the catalog to one of the child objects\n    /// (product or category):\n    /// catalog/parent-category1/.../parent-categoryN/object\n    /// </summary>\n    public partial class Outline\n    {\n        /// <summary>\n        /// Initializes a new instance of the Outline class.\n        /// </summary>\n        public Outline()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Outline class.\n        /// </summary>\n        /// <param name=\"items\">Outline parts</param>\n        public Outline(IList<OutlineItem> items = default(IList<OutlineItem>))\n        {\n            Items = items;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets outline parts\n        /// </summary>\n        [JsonProperty(PropertyName = \"items\")]\n        public IList<OutlineItem> Items { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Category\n    {\n        /// <summary>\n        /// Initializes a new instance of the Category class.\n        /// </summary>\n        public Category()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Category class.\n        /// </summary>\n        /// <param name=\"outline\">Category outline in physical catalog (all\n        /// parent categories ids concatenated. E.g. (1/21/344))</param>\n        /// <param name=\"path\">Category path in physical catalog (all parent\n        /// categories names concatenated. E.g. (parent1/parent2))</param>\n        /// <param name=\"imgSrc\">Gets the default image</param>\n        /// <param name=\"isInherited\">System flag used to mark that object was\n        /// inherited from other</param>\n        public Category(string catalogId = default(string), string parentId = default(string), string code = default(string), string name = default(string), string outline = default(string), string path = default(string), bool? isVirtual = default(bool?), int? level = default(int?), string packageType = default(string), int? priority = default(int?), bool? isActive = default(bool?), string outerId = default(string), IList<Property> properties = default(IList<Property>), IList<CategoryLink> links = default(IList<CategoryLink>), string taxType = default(string), string seoObjectType = default(string), IList<SeoInfo> seoInfos = default(IList<SeoInfo>), string imgSrc = default(string), IList<Image> images = default(IList<Image>), IList<Outline> outlines = default(IList<Outline>), bool? isInherited = default(bool?), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            CatalogId = catalogId;\n            ParentId = parentId;\n            Code = code;\n            Name = name;\n            Outline = outline;\n            Path = path;\n            IsVirtual = isVirtual;\n            Level = level;\n            PackageType = packageType;\n            Priority = priority;\n            IsActive = isActive;\n            OuterId = outerId;\n            Properties = properties;\n            Links = links;\n            TaxType = taxType;\n            SeoObjectType = seoObjectType;\n            SeoInfos = seoInfos;\n            ImgSrc = imgSrc;\n            Images = images;\n            Outlines = outlines;\n            IsInherited = isInherited;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogId\")]\n        public string CatalogId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"parentId\")]\n        public string ParentId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"code\")]\n        public string Code { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Gets category outline in physical catalog (all parent categories\n        /// ids concatenated. E.g. (1/21/344))\n        /// </summary>\n        [JsonProperty(PropertyName = \"outline\")]\n        public string Outline { get; private set; }\n\n        /// <summary>\n        /// Gets or sets category path in physical catalog (all parent\n        /// categories names concatenated. E.g. (parent1/parent2))\n        /// </summary>\n        [JsonProperty(PropertyName = \"path\")]\n        public string Path { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isVirtual\")]\n        public bool? IsVirtual { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"level\")]\n        public int? Level { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"packageType\")]\n        public string PackageType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"priority\")]\n        public int? Priority { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isActive\")]\n        public bool? IsActive { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"properties\")]\n        public IList<Property> Properties { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"links\")]\n        public IList<CategoryLink> Links { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"taxType\")]\n        public string TaxType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoObjectType\")]\n        public string SeoObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoInfos\")]\n        public IList<SeoInfo> SeoInfos { get; set; }\n\n        /// <summary>\n        /// Gets the default image\n        /// </summary>\n        [JsonProperty(PropertyName = \"imgSrc\")]\n        public string ImgSrc { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"images\")]\n        public IList<Image> Images { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outlines\")]\n        public IList<Outline> Outlines { get; set; }\n\n        /// <summary>\n        /// Gets system flag used to mark that object was inherited from other\n        /// </summary>\n        [JsonProperty(PropertyName = \"isInherited\")]\n        public bool? IsInherited { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Asset\n    {\n        /// <summary>\n        /// Initializes a new instance of the Asset class.\n        /// </summary>\n        public Asset()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Asset class.\n        /// </summary>\n        /// <param name=\"typeId\">Gets or sets the asset type\n        /// identifier.</param>\n        /// <param name=\"group\">Gets or sets the asset group name.</param>\n        /// <param name=\"name\">Gets or sets the asset name.</param>\n        /// <param name=\"languageCode\">Gets or sets the asset language.</param>\n        /// <param name=\"isInherited\">System flag used to mark that object was\n        /// inherited from other</param>\n        public Asset(string mimeType = default(string), long? size = default(long?), string readableSize = default(string), byte[] binaryData = default(byte[]), string relativeUrl = default(string), string url = default(string), string typeId = default(string), string group = default(string), string name = default(string), string outerId = default(string), string languageCode = default(string), bool? isInherited = default(bool?), string seoObjectType = default(string), IList<SeoInfo> seoInfos = default(IList<SeoInfo>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            MimeType = mimeType;\n            Size = size;\n            ReadableSize = readableSize;\n            BinaryData = binaryData;\n            RelativeUrl = relativeUrl;\n            Url = url;\n            TypeId = typeId;\n            Group = group;\n            Name = name;\n            OuterId = outerId;\n            LanguageCode = languageCode;\n            IsInherited = isInherited;\n            SeoObjectType = seoObjectType;\n            SeoInfos = seoInfos;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"mimeType\")]\n        public string MimeType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"size\")]\n        public long? Size { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"readableSize\")]\n        public string ReadableSize { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"binaryData\")]\n        public byte[] BinaryData { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"relativeUrl\")]\n        public string RelativeUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"url\")]\n        public string Url { get; set; }\n\n        /// <summary>\n        /// Gets or sets the asset type identifier.\n        /// </summary>\n        [JsonProperty(PropertyName = \"typeId\")]\n        public string TypeId { get; set; }\n\n        /// <summary>\n        /// Gets or sets the asset group name.\n        /// </summary>\n        [JsonProperty(PropertyName = \"group\")]\n        public string Group { get; set; }\n\n        /// <summary>\n        /// Gets or sets the asset name.\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// Gets or sets the asset language.\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// Gets system flag used to mark that object was inherited from other\n        /// </summary>\n        [JsonProperty(PropertyName = \"isInherited\")]\n        public bool? IsInherited { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoObjectType\")]\n        public string SeoObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoInfos\")]\n        public IList<SeoInfo> SeoInfos { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class EditorialReview\n    {\n        /// <summary>\n        /// Initializes a new instance of the EditorialReview class.\n        /// </summary>\n        public EditorialReview()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the EditorialReview class.\n        /// </summary>\n        public EditorialReview(string content = default(string), string reviewType = default(string), string languageCode = default(string), bool? isInherited = default(bool?), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Content = content;\n            ReviewType = reviewType;\n            LanguageCode = languageCode;\n            IsInherited = isInherited;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"content\")]\n        public string Content { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"reviewType\")]\n        public string ReviewType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isInherited\")]\n        public bool? IsInherited { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Variation\n    {\n        /// <summary>\n        /// Initializes a new instance of the Variation class.\n        /// </summary>\n        public Variation()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Variation class.\n        /// </summary>\n        /// <param name=\"code\">SKU code</param>\n        /// <param name=\"gtin\">Global Trade Item Number (GTIN). These\n        /// identifiers include UPC (in North America), EAN (in Europe), JAN\n        /// (in Japan), and ISBN (for books).</param>\n        /// <param name=\"outline\">Product outline in physical catalog (all\n        /// parent categories ids concatenated. E.g. (1/21/344))</param>\n        /// <param name=\"path\">Product path in physical catalog (all parent\n        /// categories names concatenated. E.g. (parent1/parent2))</param>\n        /// <param name=\"productType\">Can be Physical, Digital or\n        /// Subscription.</param>\n        /// <param name=\"maxNumberOfDownload\">re-downloads limit</param>\n        /// <param name=\"downloadType\">DownloadType: {Standard Product,\n        /// Software, Music}</param>\n        /// <param name=\"priority\">Product order position in catalog</param>\n        /// <param name=\"imgSrc\">Gets the default image for the\n        /// product.</param>\n        /// <param name=\"seoObjectType\">Each descendant type should override\n        /// this property to use other object type for seo records</param>\n        /// <param name=\"isInherited\">System flag used to mark that object was\n        /// inherited from other</param>\n        public Variation(string code = default(string), string manufacturerPartNumber = default(string), string gtin = default(string), string name = default(string), string catalogId = default(string), string categoryId = default(string), string outline = default(string), string path = default(string), string titularItemId = default(string), string mainProductId = default(string), bool? isBuyable = default(bool?), bool? isActive = default(bool?), bool? trackInventory = default(bool?), System.DateTime? indexingDate = default(System.DateTime?), int? maxQuantity = default(int?), int? minQuantity = default(int?), string productType = default(string), string packageType = default(string), string weightUnit = default(string), double? weight = default(double?), string measureUnit = default(string), double? height = default(double?), double? length = default(double?), double? width = default(double?), bool? enableReview = default(bool?), int? maxNumberOfDownload = default(int?), System.DateTime? downloadExpiration = default(System.DateTime?), string downloadType = default(string), bool? hasUserAgreement = default(bool?), string shippingType = default(string), string taxType = default(string), string vendor = default(string), System.DateTime? startDate = default(System.DateTime?), System.DateTime? endDate = default(System.DateTime?), int? priority = default(int?), string outerId = default(string), IList<Property> properties = default(IList<Property>), IList<PropertyValue> propertyValues = default(IList<PropertyValue>), string imgSrc = default(string), IList<Image> images = default(IList<Image>), IList<Asset> assets = default(IList<Asset>), IList<CategoryLink> links = default(IList<CategoryLink>), IList<Variation> variations = default(IList<Variation>), string seoObjectType = default(string), IList<SeoInfo> seoInfos = default(IList<SeoInfo>), IList<EditorialReview> reviews = default(IList<EditorialReview>), IList<ProductAssociation> associations = default(IList<ProductAssociation>), IList<ProductAssociation> referencedAssociations = default(IList<ProductAssociation>), IList<Outline> outlines = default(IList<Outline>), bool? isInherited = default(bool?), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Code = code;\n            ManufacturerPartNumber = manufacturerPartNumber;\n            Gtin = gtin;\n            Name = name;\n            CatalogId = catalogId;\n            CategoryId = categoryId;\n            Outline = outline;\n            Path = path;\n            TitularItemId = titularItemId;\n            MainProductId = mainProductId;\n            IsBuyable = isBuyable;\n            IsActive = isActive;\n            TrackInventory = trackInventory;\n            IndexingDate = indexingDate;\n            MaxQuantity = maxQuantity;\n            MinQuantity = minQuantity;\n            ProductType = productType;\n            PackageType = packageType;\n            WeightUnit = weightUnit;\n            Weight = weight;\n            MeasureUnit = measureUnit;\n            Height = height;\n            Length = length;\n            Width = width;\n            EnableReview = enableReview;\n            MaxNumberOfDownload = maxNumberOfDownload;\n            DownloadExpiration = downloadExpiration;\n            DownloadType = downloadType;\n            HasUserAgreement = hasUserAgreement;\n            ShippingType = shippingType;\n            TaxType = taxType;\n            Vendor = vendor;\n            StartDate = startDate;\n            EndDate = endDate;\n            Priority = priority;\n            OuterId = outerId;\n            Properties = properties;\n            PropertyValues = propertyValues;\n            ImgSrc = imgSrc;\n            Images = images;\n            Assets = assets;\n            Links = links;\n            Variations = variations;\n            SeoObjectType = seoObjectType;\n            SeoInfos = seoInfos;\n            Reviews = reviews;\n            Associations = associations;\n            ReferencedAssociations = referencedAssociations;\n            Outlines = outlines;\n            IsInherited = isInherited;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets SKU code\n        /// </summary>\n        [JsonProperty(PropertyName = \"code\")]\n        public string Code { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"manufacturerPartNumber\")]\n        public string ManufacturerPartNumber { get; set; }\n\n        /// <summary>\n        /// Gets or sets global Trade Item Number (GTIN). These identifiers\n        /// include UPC (in North America), EAN (in Europe), JAN (in Japan),\n        /// and ISBN (for books).\n        /// </summary>\n        [JsonProperty(PropertyName = \"gtin\")]\n        public string Gtin { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogId\")]\n        public string CatalogId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"categoryId\")]\n        public string CategoryId { get; set; }\n\n        /// <summary>\n        /// Gets product outline in physical catalog (all parent categories ids\n        /// concatenated. E.g. (1/21/344))\n        /// </summary>\n        [JsonProperty(PropertyName = \"outline\")]\n        public string Outline { get; private set; }\n\n        /// <summary>\n        /// Gets product path in physical catalog (all parent categories names\n        /// concatenated. E.g. (parent1/parent2))\n        /// </summary>\n        [JsonProperty(PropertyName = \"path\")]\n        public string Path { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"titularItemId\")]\n        public string TitularItemId { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"mainProductId\")]\n        public string MainProductId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isBuyable\")]\n        public bool? IsBuyable { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isActive\")]\n        public bool? IsActive { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"trackInventory\")]\n        public bool? TrackInventory { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"indexingDate\")]\n        public System.DateTime? IndexingDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"maxQuantity\")]\n        public int? MaxQuantity { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"minQuantity\")]\n        public int? MinQuantity { get; set; }\n\n        /// <summary>\n        /// Gets or sets can be Physical, Digital or Subscription.\n        /// </summary>\n        [JsonProperty(PropertyName = \"productType\")]\n        public string ProductType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"packageType\")]\n        public string PackageType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"weightUnit\")]\n        public string WeightUnit { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"weight\")]\n        public double? Weight { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"measureUnit\")]\n        public string MeasureUnit { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"height\")]\n        public double? Height { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"length\")]\n        public double? Length { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"width\")]\n        public double? Width { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"enableReview\")]\n        public bool? EnableReview { get; set; }\n\n        /// <summary>\n        /// Gets or sets re-downloads limit\n        /// </summary>\n        [JsonProperty(PropertyName = \"maxNumberOfDownload\")]\n        public int? MaxNumberOfDownload { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"downloadExpiration\")]\n        public System.DateTime? DownloadExpiration { get; set; }\n\n        /// <summary>\n        /// Gets or sets downloadType: {Standard Product, Software, Music}\n        /// </summary>\n        [JsonProperty(PropertyName = \"downloadType\")]\n        public string DownloadType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"hasUserAgreement\")]\n        public bool? HasUserAgreement { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"shippingType\")]\n        public string ShippingType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"taxType\")]\n        public string TaxType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"vendor\")]\n        public string Vendor { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"startDate\")]\n        public System.DateTime? StartDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"endDate\")]\n        public System.DateTime? EndDate { get; set; }\n\n        /// <summary>\n        /// Gets or sets product order position in catalog\n        /// </summary>\n        [JsonProperty(PropertyName = \"priority\")]\n        public int? Priority { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"properties\")]\n        public IList<Property> Properties { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyValues\")]\n        public IList<PropertyValue> PropertyValues { get; set; }\n\n        /// <summary>\n        /// Gets the default image for the product.\n        /// </summary>\n        [JsonProperty(PropertyName = \"imgSrc\")]\n        public string ImgSrc { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"images\")]\n        public IList<Image> Images { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"assets\")]\n        public IList<Asset> Assets { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"links\")]\n        public IList<CategoryLink> Links { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"variations\")]\n        public IList<Variation> Variations { get; set; }\n\n        /// <summary>\n        /// Gets each descendant type should override this property to use\n        /// other object type for seo records\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoObjectType\")]\n        public string SeoObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoInfos\")]\n        public IList<SeoInfo> SeoInfos { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"reviews\")]\n        public IList<EditorialReview> Reviews { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"associations\")]\n        public IList<ProductAssociation> Associations { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"referencedAssociations\")]\n        public IList<ProductAssociation> ReferencedAssociations { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outlines\")]\n        public IList<Outline> Outlines { get; set; }\n\n        /// <summary>\n        /// Gets system flag used to mark that object was inherited from other\n        /// </summary>\n        [JsonProperty(PropertyName = \"isInherited\")]\n        public bool? IsInherited { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class CatalogProduct\n    {\n        /// <summary>\n        /// Initializes a new instance of the CatalogProduct class.\n        /// </summary>\n        public CatalogProduct()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogProduct class.\n        /// </summary>\n        /// <param name=\"code\">SKU code</param>\n        /// <param name=\"gtin\">Global Trade Item Number (GTIN). These\n        /// identifiers include UPC (in North America), EAN (in Europe), JAN\n        /// (in Japan), and ISBN (for books).</param>\n        /// <param name=\"outline\">Product outline in physical catalog (all\n        /// parent categories ids concatenated. E.g. (1/21/344))</param>\n        /// <param name=\"path\">Product path in physical catalog (all parent\n        /// categories names concatenated. E.g. (parent1/parent2))</param>\n        /// <param name=\"productType\">Can be Physical, Digital or\n        /// Subscription.</param>\n        /// <param name=\"maxNumberOfDownload\">re-downloads limit</param>\n        /// <param name=\"downloadType\">DownloadType: {Standard Product,\n        /// Software, Music}</param>\n        /// <param name=\"priority\">Product order position in catalog</param>\n        /// <param name=\"imgSrc\">Gets the default image for the\n        /// product.</param>\n        /// <param name=\"seoObjectType\">Each descendant type should override\n        /// this property to use other object type for seo records</param>\n        /// <param name=\"isInherited\">System flag used to mark that object was\n        /// inherited from other</param>\n        public CatalogProduct(string code = default(string), string manufacturerPartNumber = default(string), string gtin = default(string), string name = default(string), string catalogId = default(string), string categoryId = default(string), string outline = default(string), string path = default(string), string titularItemId = default(string), string mainProductId = default(string), bool? isBuyable = default(bool?), bool? isActive = default(bool?), bool? trackInventory = default(bool?), System.DateTime? indexingDate = default(System.DateTime?), int? maxQuantity = default(int?), int? minQuantity = default(int?), string productType = default(string), string packageType = default(string), string weightUnit = default(string), double? weight = default(double?), string measureUnit = default(string), double? height = default(double?), double? length = default(double?), double? width = default(double?), bool? enableReview = default(bool?), int? maxNumberOfDownload = default(int?), System.DateTime? downloadExpiration = default(System.DateTime?), string downloadType = default(string), bool? hasUserAgreement = default(bool?), string shippingType = default(string), string taxType = default(string), string vendor = default(string), System.DateTime? startDate = default(System.DateTime?), System.DateTime? endDate = default(System.DateTime?), int? priority = default(int?), string outerId = default(string), IList<Property> properties = default(IList<Property>), IList<PropertyValue> propertyValues = default(IList<PropertyValue>), string imgSrc = default(string), IList<Image> images = default(IList<Image>), IList<Asset> assets = default(IList<Asset>), IList<CategoryLink> links = default(IList<CategoryLink>), IList<Variation> variations = default(IList<Variation>), string seoObjectType = default(string), IList<SeoInfo> seoInfos = default(IList<SeoInfo>), IList<EditorialReview> reviews = default(IList<EditorialReview>), IList<ProductAssociation> associations = default(IList<ProductAssociation>), IList<ProductAssociation> referencedAssociations = default(IList<ProductAssociation>), IList<Outline> outlines = default(IList<Outline>), bool? isInherited = default(bool?), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Code = code;\n            ManufacturerPartNumber = manufacturerPartNumber;\n            Gtin = gtin;\n            Name = name;\n            CatalogId = catalogId;\n            CategoryId = categoryId;\n            Outline = outline;\n            Path = path;\n            TitularItemId = titularItemId;\n            MainProductId = mainProductId;\n            IsBuyable = isBuyable;\n            IsActive = isActive;\n            TrackInventory = trackInventory;\n            IndexingDate = indexingDate;\n            MaxQuantity = maxQuantity;\n            MinQuantity = minQuantity;\n            ProductType = productType;\n            PackageType = packageType;\n            WeightUnit = weightUnit;\n            Weight = weight;\n            MeasureUnit = measureUnit;\n            Height = height;\n            Length = length;\n            Width = width;\n            EnableReview = enableReview;\n            MaxNumberOfDownload = maxNumberOfDownload;\n            DownloadExpiration = downloadExpiration;\n            DownloadType = downloadType;\n            HasUserAgreement = hasUserAgreement;\n            ShippingType = shippingType;\n            TaxType = taxType;\n            Vendor = vendor;\n            StartDate = startDate;\n            EndDate = endDate;\n            Priority = priority;\n            OuterId = outerId;\n            Properties = properties;\n            PropertyValues = propertyValues;\n            ImgSrc = imgSrc;\n            Images = images;\n            Assets = assets;\n            Links = links;\n            Variations = variations;\n            SeoObjectType = seoObjectType;\n            SeoInfos = seoInfos;\n            Reviews = reviews;\n            Associations = associations;\n            ReferencedAssociations = referencedAssociations;\n            Outlines = outlines;\n            IsInherited = isInherited;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets SKU code\n        /// </summary>\n        [JsonProperty(PropertyName = \"code\")]\n        public string Code { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"manufacturerPartNumber\")]\n        public string ManufacturerPartNumber { get; set; }\n\n        /// <summary>\n        /// Gets or sets global Trade Item Number (GTIN). These identifiers\n        /// include UPC (in North America), EAN (in Europe), JAN (in Japan),\n        /// and ISBN (for books).\n        /// </summary>\n        [JsonProperty(PropertyName = \"gtin\")]\n        public string Gtin { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogId\")]\n        public string CatalogId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"categoryId\")]\n        public string CategoryId { get; set; }\n\n        /// <summary>\n        /// Gets product outline in physical catalog (all parent categories ids\n        /// concatenated. E.g. (1/21/344))\n        /// </summary>\n        [JsonProperty(PropertyName = \"outline\")]\n        public string Outline { get; private set; }\n\n        /// <summary>\n        /// Gets product path in physical catalog (all parent categories names\n        /// concatenated. E.g. (parent1/parent2))\n        /// </summary>\n        [JsonProperty(PropertyName = \"path\")]\n        public string Path { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"titularItemId\")]\n        public string TitularItemId { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"mainProductId\")]\n        public string MainProductId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isBuyable\")]\n        public bool? IsBuyable { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isActive\")]\n        public bool? IsActive { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"trackInventory\")]\n        public bool? TrackInventory { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"indexingDate\")]\n        public System.DateTime? IndexingDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"maxQuantity\")]\n        public int? MaxQuantity { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"minQuantity\")]\n        public int? MinQuantity { get; set; }\n\n        /// <summary>\n        /// Gets or sets can be Physical, Digital or Subscription.\n        /// </summary>\n        [JsonProperty(PropertyName = \"productType\")]\n        public string ProductType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"packageType\")]\n        public string PackageType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"weightUnit\")]\n        public string WeightUnit { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"weight\")]\n        public double? Weight { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"measureUnit\")]\n        public string MeasureUnit { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"height\")]\n        public double? Height { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"length\")]\n        public double? Length { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"width\")]\n        public double? Width { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"enableReview\")]\n        public bool? EnableReview { get; set; }\n\n        /// <summary>\n        /// Gets or sets re-downloads limit\n        /// </summary>\n        [JsonProperty(PropertyName = \"maxNumberOfDownload\")]\n        public int? MaxNumberOfDownload { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"downloadExpiration\")]\n        public System.DateTime? DownloadExpiration { get; set; }\n\n        /// <summary>\n        /// Gets or sets downloadType: {Standard Product, Software, Music}\n        /// </summary>\n        [JsonProperty(PropertyName = \"downloadType\")]\n        public string DownloadType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"hasUserAgreement\")]\n        public bool? HasUserAgreement { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"shippingType\")]\n        public string ShippingType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"taxType\")]\n        public string TaxType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"vendor\")]\n        public string Vendor { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"startDate\")]\n        public System.DateTime? StartDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"endDate\")]\n        public System.DateTime? EndDate { get; set; }\n\n        /// <summary>\n        /// Gets or sets product order position in catalog\n        /// </summary>\n        [JsonProperty(PropertyName = \"priority\")]\n        public int? Priority { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"properties\")]\n        public IList<Property> Properties { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyValues\")]\n        public IList<PropertyValue> PropertyValues { get; set; }\n\n        /// <summary>\n        /// Gets the default image for the product.\n        /// </summary>\n        [JsonProperty(PropertyName = \"imgSrc\")]\n        public string ImgSrc { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"images\")]\n        public IList<Image> Images { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"assets\")]\n        public IList<Asset> Assets { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"links\")]\n        public IList<CategoryLink> Links { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"variations\")]\n        public IList<Variation> Variations { get; set; }\n\n        /// <summary>\n        /// Gets each descendant type should override this property to use\n        /// other object type for seo records\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoObjectType\")]\n        public string SeoObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoInfos\")]\n        public IList<SeoInfo> SeoInfos { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"reviews\")]\n        public IList<EditorialReview> Reviews { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"associations\")]\n        public IList<ProductAssociation> Associations { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"referencedAssociations\")]\n        public IList<ProductAssociation> ReferencedAssociations { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outlines\")]\n        public IList<Outline> Outlines { get; set; }\n\n        /// <summary>\n        /// Gets system flag used to mark that object was inherited from other\n        /// </summary>\n        [JsonProperty(PropertyName = \"isInherited\")]\n        public bool? IsInherited { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class PropertyDictionaryItemLocalizedValue\n    {\n        /// <summary>\n        /// Initializes a new instance of the\n        /// PropertyDictionaryItemLocalizedValue class.\n        /// </summary>\n        public PropertyDictionaryItemLocalizedValue()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the\n        /// PropertyDictionaryItemLocalizedValue class.\n        /// </summary>\n        public PropertyDictionaryItemLocalizedValue(string languageCode = default(string), string value = default(string))\n        {\n            LanguageCode = languageCode;\n            Value = value;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"value\")]\n        public string Value { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class PropertyDictionaryItem\n    {\n        /// <summary>\n        /// Initializes a new instance of the PropertyDictionaryItem class.\n        /// </summary>\n        public PropertyDictionaryItem()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PropertyDictionaryItem class.\n        /// </summary>\n        public PropertyDictionaryItem(string propertyId = default(string), string alias = default(string), int? sortOrder = default(int?), IList<PropertyDictionaryItemLocalizedValue> localizedValues = default(IList<PropertyDictionaryItemLocalizedValue>), string id = default(string))\n        {\n            PropertyId = propertyId;\n            Alias = alias;\n            SortOrder = sortOrder;\n            LocalizedValues = localizedValues;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyId\")]\n        public string PropertyId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"alias\")]\n        public string Alias { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortOrder\")]\n        public int? SortOrder { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"localizedValues\")]\n        public IList<PropertyDictionaryItemLocalizedValue> LocalizedValues { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SortInfo\n    {\n        /// <summary>\n        /// Initializes a new instance of the SortInfo class.\n        /// </summary>\n        public SortInfo()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SortInfo class.\n        /// </summary>\n        /// <param name=\"sortDirection\">Possible values include: 'Ascending',\n        /// 'Descending'</param>\n        public SortInfo(string sortColumn = default(string), string sortDirection = default(string))\n        {\n            SortColumn = sortColumn;\n            SortDirection = sortDirection;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortColumn\")]\n        public string SortColumn { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Ascending', 'Descending'\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortDirection\")]\n        public string SortDirection { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ProductAssociationSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the ProductAssociationSearchCriteria\n        /// class.\n        /// </summary>\n        public ProductAssociationSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ProductAssociationSearchCriteria\n        /// class.\n        /// </summary>\n        public ProductAssociationSearchCriteria(string group = default(string), IList<string> tags = default(IList<string>), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            Group = group;\n            Tags = tags;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"group\")]\n        public string Group { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"tags\")]\n        public IList<string> Tags { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ProductAssociationSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the ProductAssociationSearchResult\n        /// class.\n        /// </summary>\n        public ProductAssociationSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ProductAssociationSearchResult\n        /// class.\n        /// </summary>\n        public ProductAssociationSearchResult(int? totalCount = default(int?), IList<ProductAssociation> results = default(IList<ProductAssociation>))\n        {\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<ProductAssociation> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class CatalogSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the CatalogSearchCriteria class.\n        /// </summary>\n        public CatalogSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogSearchCriteria class.\n        /// </summary>\n        public CatalogSearchCriteria(IList<string> catalogIds = default(IList<string>), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            CatalogIds = catalogIds;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogIds\")]\n        public IList<string> CatalogIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class CatalogLanguage\n    {\n        /// <summary>\n        /// Initializes a new instance of the CatalogLanguage class.\n        /// </summary>\n        public CatalogLanguage()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogLanguage class.\n        /// </summary>\n        public CatalogLanguage(string catalogId = default(string), bool? isDefault = default(bool?), string languageCode = default(string), string id = default(string))\n        {\n            CatalogId = catalogId;\n            IsDefault = isDefault;\n            LanguageCode = languageCode;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogId\")]\n        public string CatalogId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isDefault\")]\n        public bool? IsDefault { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Catalog\n    {\n        /// <summary>\n        /// Initializes a new instance of the Catalog class.\n        /// </summary>\n        public Catalog()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Catalog class.\n        /// </summary>\n        public Catalog(string name = default(string), bool? isVirtual = default(bool?), string outerId = default(string), CatalogLanguage defaultLanguage = default(CatalogLanguage), IList<CatalogLanguage> languages = default(IList<CatalogLanguage>), IList<Property> properties = default(IList<Property>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Name = name;\n            IsVirtual = isVirtual;\n            OuterId = outerId;\n            DefaultLanguage = defaultLanguage;\n            Languages = languages;\n            Properties = properties;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isVirtual\")]\n        public bool? IsVirtual { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"defaultLanguage\")]\n        public CatalogLanguage DefaultLanguage { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languages\")]\n        public IList<CatalogLanguage> Languages { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"properties\")]\n        public IList<Property> Properties { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class CatalogSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the CatalogSearchResult class.\n        /// </summary>\n        public CatalogSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogSearchResult class.\n        /// </summary>\n        public CatalogSearchResult(int? totalCount = default(int?), IList<Catalog> results = default(IList<Catalog>))\n        {\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<Catalog> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class NumericRange\n    {\n        /// <summary>\n        /// Initializes a new instance of the NumericRange class.\n        /// </summary>\n        public NumericRange()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NumericRange class.\n        /// </summary>\n        public NumericRange(double? lower = default(double?), double? upper = default(double?), bool? includeLower = default(bool?), bool? includeUpper = default(bool?))\n        {\n            Lower = lower;\n            Upper = upper;\n            IncludeLower = includeLower;\n            IncludeUpper = includeUpper;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"lower\")]\n        public double? Lower { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"upper\")]\n        public double? Upper { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"includeLower\")]\n        public bool? IncludeLower { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"includeUpper\")]\n        public bool? IncludeUpper { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class GeoPoint\n    {\n        /// <summary>\n        /// Initializes a new instance of the GeoPoint class.\n        /// </summary>\n        public GeoPoint()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the GeoPoint class.\n        /// </summary>\n        public GeoPoint(double? latitude = default(double?), double? longitude = default(double?))\n        {\n            Latitude = latitude;\n            Longitude = longitude;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"latitude\")]\n        public double? Latitude { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"longitude\")]\n        public double? Longitude { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class GeoDistanceFilter\n    {\n        /// <summary>\n        /// Initializes a new instance of the GeoDistanceFilter class.\n        /// </summary>\n        public GeoDistanceFilter()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the GeoDistanceFilter class.\n        /// </summary>\n        public GeoDistanceFilter(string fieldName = default(string), GeoPoint location = default(GeoPoint), double? distance = default(double?))\n        {\n            FieldName = fieldName;\n            Location = location;\n            Distance = distance;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"fieldName\")]\n        public string FieldName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"location\")]\n        public GeoPoint Location { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"distance\")]\n        public double? Distance { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ProductIndexedSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the ProductIndexedSearchCriteria\n        /// class.\n        /// </summary>\n        public ProductIndexedSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ProductIndexedSearchCriteria\n        /// class.\n        /// </summary>\n        /// <param name=\"productType\">Physical, Digital, etc.</param>\n        /// <param name=\"classTypes\">Gets or sets the class types.</param>\n        /// <param name=\"withHidden\">Specifies if we search for hidden\n        /// products.</param>\n        /// <param name=\"startDate\">Gets or sets the start date. The date must\n        /// be in UTC format as that is format indexes are stored in.</param>\n        /// <param name=\"startDateFrom\">Gets or sets the start date from\n        /// filter. Used for filtering new products. The date must be in UTC\n        /// format as that is format indexes are stored in.</param>\n        /// <param name=\"endDate\">Gets or sets the end date. The date must be\n        /// in UTC format as that is format indexes are stored in.</param>\n        /// <param name=\"includeAggregations\">Gets or sets a \"white\" list of\n        /// aggregation keys that identify preconfigured aggregations, which\n        /// SHOULD be calculated and returned with the search result.</param>\n        /// <param name=\"excludeAggregations\">Gets or sets a \"black\" list of\n        /// aggregation keys that identify preconfigured aggregations, which\n        /// SHOULD NOT be calculated and returned with the search\n        /// result.</param>\n        /// <param name=\"sortInfos\">Override base SortInfo property to support\n        /// GeoSortInfo sorting types</param>\n        /// <param name=\"outline\">CategoryId1/CategoryId2, no catalog should be\n        /// included in the outline</param>\n        /// <param name=\"outlines\">CategoryId1/CategoryId2, no catalog should\n        /// be included in the outline</param>\n        /// <param name=\"terms\">Term format: name:value1,value2</param>\n        /// <param name=\"userGroups\">Assigned groups for current user. Data\n        /// format: user_groups:value1,value2</param>\n        /// <param name=\"isFuzzySearch\">Enable fuzzy search, i.e. allow to\n        /// search color:white even if color:wihte actually passed to\n        /// criteria</param>\n        /// <param name=\"rawQuery\">Gets or sets the search provider specific\n        /// raw search query; all other search criteria will be ignored</param>\n        /// <param name=\"includeFields\">Allows to retrieve only a specific set\n        /// of fields in the result hits</param>\n        public ProductIndexedSearchCriteria(string objectType = default(string), string productType = default(string), string currency = default(string), IList<string> pricelists = default(IList<string>), NumericRange priceRange = default(NumericRange), IList<string> classTypes = default(IList<string>), bool? withHidden = default(bool?), System.DateTime? startDate = default(System.DateTime?), System.DateTime? startDateFrom = default(System.DateTime?), System.DateTime? endDate = default(System.DateTime?), IList<string> includeAggregations = default(IList<string>), IList<string> excludeAggregations = default(IList<string>), GeoDistanceFilter geoDistanceFilter = default(GeoDistanceFilter), IList<SortInfo> sortInfos = default(IList<SortInfo>), string storeId = default(string), string catalogId = default(string), string outline = default(string), IList<string> outlines = default(IList<string>), IList<string> terms = default(IList<string>), IList<string> userGroups = default(IList<string>), bool? isFuzzySearch = default(bool?), string rawQuery = default(string), IList<string> includeFields = default(IList<string>), string searchPhrase = default(string), string keyword = default(string), string responseGroup = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string languageCode = default(string), string sort = default(string), int? skip = default(int?), int? take = default(int?))\n        {\n            ObjectType = objectType;\n            ProductType = productType;\n            Currency = currency;\n            Pricelists = pricelists;\n            PriceRange = priceRange;\n            ClassTypes = classTypes;\n            WithHidden = withHidden;\n            StartDate = startDate;\n            StartDateFrom = startDateFrom;\n            EndDate = endDate;\n            IncludeAggregations = includeAggregations;\n            ExcludeAggregations = excludeAggregations;\n            GeoDistanceFilter = geoDistanceFilter;\n            SortInfos = sortInfos;\n            StoreId = storeId;\n            CatalogId = catalogId;\n            Outline = outline;\n            Outlines = outlines;\n            Terms = terms;\n            UserGroups = userGroups;\n            IsFuzzySearch = isFuzzySearch;\n            RawQuery = rawQuery;\n            IncludeFields = includeFields;\n            SearchPhrase = searchPhrase;\n            Keyword = keyword;\n            ResponseGroup = responseGroup;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            LanguageCode = languageCode;\n            Sort = sort;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// Gets or sets physical, Digital, etc.\n        /// </summary>\n        [JsonProperty(PropertyName = \"productType\")]\n        public string ProductType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"currency\")]\n        public string Currency { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"pricelists\")]\n        public IList<string> Pricelists { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"priceRange\")]\n        public NumericRange PriceRange { get; set; }\n\n        /// <summary>\n        /// Gets or sets the class types.\n        /// </summary>\n        [JsonProperty(PropertyName = \"classTypes\")]\n        public IList<string> ClassTypes { get; set; }\n\n        /// <summary>\n        /// Gets or sets specifies if we search for hidden products.\n        /// </summary>\n        [JsonProperty(PropertyName = \"withHidden\")]\n        public bool? WithHidden { get; set; }\n\n        /// <summary>\n        /// Gets or sets the start date. The date must be in UTC format as that\n        /// is format indexes are stored in.\n        /// </summary>\n        [JsonProperty(PropertyName = \"startDate\")]\n        public System.DateTime? StartDate { get; set; }\n\n        /// <summary>\n        /// Gets or sets the start date from filter. Used for filtering new\n        /// products. The date must be in UTC format as that is format indexes\n        /// are stored in.\n        /// </summary>\n        [JsonProperty(PropertyName = \"startDateFrom\")]\n        public System.DateTime? StartDateFrom { get; set; }\n\n        /// <summary>\n        /// Gets or sets the end date. The date must be in UTC format as that\n        /// is format indexes are stored in.\n        /// </summary>\n        [JsonProperty(PropertyName = \"endDate\")]\n        public System.DateTime? EndDate { get; set; }\n\n        /// <summary>\n        /// Gets or sets a \"white\" list of aggregation keys that identify\n        /// preconfigured aggregations, which SHOULD be calculated and returned\n        /// with the search result.\n        /// </summary>\n        [JsonProperty(PropertyName = \"includeAggregations\")]\n        public IList<string> IncludeAggregations { get; set; }\n\n        /// <summary>\n        /// Gets or sets a \"black\" list of aggregation keys that identify\n        /// preconfigured aggregations, which SHOULD NOT be calculated and\n        /// returned with the search result.\n        /// </summary>\n        [JsonProperty(PropertyName = \"excludeAggregations\")]\n        public IList<string> ExcludeAggregations { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"geoDistanceFilter\")]\n        public GeoDistanceFilter GeoDistanceFilter { get; set; }\n\n        /// <summary>\n        /// Gets override base SortInfo property to support GeoSortInfo sorting\n        /// types\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeId\")]\n        public string StoreId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogId\")]\n        public string CatalogId { get; set; }\n\n        /// <summary>\n        /// Gets or sets categoryId1/CategoryId2, no catalog should be included\n        /// in the outline\n        /// </summary>\n        [JsonProperty(PropertyName = \"outline\")]\n        public string Outline { get; set; }\n\n        /// <summary>\n        /// Gets or sets categoryId1/CategoryId2, no catalog should be included\n        /// in the outline\n        /// </summary>\n        [JsonProperty(PropertyName = \"outlines\")]\n        public IList<string> Outlines { get; set; }\n\n        /// <summary>\n        /// Gets or sets term format: name:value1,value2\n        /// </summary>\n        [JsonProperty(PropertyName = \"terms\")]\n        public IList<string> Terms { get; set; }\n\n        /// <summary>\n        /// Gets or sets assigned groups for current user. Data format:\n        /// user_groups:value1,value2\n        /// </summary>\n        [JsonProperty(PropertyName = \"userGroups\")]\n        public IList<string> UserGroups { get; set; }\n\n        /// <summary>\n        /// Gets or sets enable fuzzy search, i.e. allow to search color:white\n        /// even if color:wihte actually passed to criteria\n        /// </summary>\n        [JsonProperty(PropertyName = \"isFuzzySearch\")]\n        public bool? IsFuzzySearch { get; set; }\n\n        /// <summary>\n        /// Gets or sets the search provider specific raw search query; all\n        /// other search criteria will be ignored\n        /// </summary>\n        [JsonProperty(PropertyName = \"rawQuery\")]\n        public string RawQuery { get; set; }\n\n        /// <summary>\n        /// Gets or sets allows to retrieve only a specific set of fields in\n        /// the result hits\n        /// </summary>\n        [JsonProperty(PropertyName = \"includeFields\")]\n        public IList<string> IncludeFields { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class AggregationLabel\n    {\n        /// <summary>\n        /// Initializes a new instance of the AggregationLabel class.\n        /// </summary>\n        public AggregationLabel()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the AggregationLabel class.\n        /// </summary>\n        public AggregationLabel(string language = default(string), string label = default(string))\n        {\n            Language = language;\n            Label = label;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"language\")]\n        public string Language { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"label\")]\n        public string Label { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class AggregationItem\n    {\n        /// <summary>\n        /// Initializes a new instance of the AggregationItem class.\n        /// </summary>\n        public AggregationItem()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the AggregationItem class.\n        /// </summary>\n        /// <param name=\"value\">Gets or sets the aggregation item value</param>\n        /// <param name=\"count\">Gets or sets the aggregation item count</param>\n        /// <param name=\"isApplied\">Gets or sets the flag for aggregation item\n        /// is applied</param>\n        /// <param name=\"labels\">Gets or sets the collection of the aggregation\n        /// item labels</param>\n        /// <param name=\"requestedLowerBound\">Gets or sets the request lower\n        /// bound for range aggregation value</param>\n        /// <param name=\"requestedUpperBound\">Gets or sets the request lower\n        /// bound for range aggregation value</param>\n        public AggregationItem(object value = default(object), int? count = default(int?), bool? isApplied = default(bool?), IList<AggregationLabel> labels = default(IList<AggregationLabel>), string requestedLowerBound = default(string), string requestedUpperBound = default(string))\n        {\n            Value = value;\n            Count = count;\n            IsApplied = isApplied;\n            Labels = labels;\n            RequestedLowerBound = requestedLowerBound;\n            RequestedUpperBound = requestedUpperBound;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets the aggregation item value\n        /// </summary>\n        [JsonProperty(PropertyName = \"value\")]\n        public object Value { get; set; }\n\n        /// <summary>\n        /// Gets or sets the aggregation item count\n        /// </summary>\n        [JsonProperty(PropertyName = \"count\")]\n        public int? Count { get; set; }\n\n        /// <summary>\n        /// Gets or sets the flag for aggregation item is applied\n        /// </summary>\n        [JsonProperty(PropertyName = \"isApplied\")]\n        public bool? IsApplied { get; set; }\n\n        /// <summary>\n        /// Gets or sets the collection of the aggregation item labels\n        /// </summary>\n        [JsonProperty(PropertyName = \"labels\")]\n        public IList<AggregationLabel> Labels { get; set; }\n\n        /// <summary>\n        /// Gets or sets the request lower bound for range aggregation value\n        /// </summary>\n        [JsonProperty(PropertyName = \"requestedLowerBound\")]\n        public string RequestedLowerBound { get; set; }\n\n        /// <summary>\n        /// Gets or sets the request lower bound for range aggregation value\n        /// </summary>\n        [JsonProperty(PropertyName = \"requestedUpperBound\")]\n        public string RequestedUpperBound { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Aggregation\n    {\n        /// <summary>\n        /// Initializes a new instance of the Aggregation class.\n        /// </summary>\n        public Aggregation()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Aggregation class.\n        /// </summary>\n        /// <param name=\"aggregationType\">Gets or sets the value of the\n        /// aggregation type</param>\n        /// <param name=\"field\">Gets or sets the value of the aggregation\n        /// field</param>\n        /// <param name=\"labels\">Gets or sets the collection of the aggregation\n        /// labels</param>\n        /// <param name=\"items\">Gets or sets the collection of the aggregation\n        /// items</param>\n        public Aggregation(string aggregationType = default(string), string field = default(string), IList<AggregationLabel> labels = default(IList<AggregationLabel>), IList<AggregationItem> items = default(IList<AggregationItem>))\n        {\n            AggregationType = aggregationType;\n            Field = field;\n            Labels = labels;\n            Items = items;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets the value of the aggregation type\n        /// </summary>\n        [JsonProperty(PropertyName = \"aggregationType\")]\n        public string AggregationType { get; set; }\n\n        /// <summary>\n        /// Gets or sets the value of the aggregation field\n        /// </summary>\n        [JsonProperty(PropertyName = \"field\")]\n        public string Field { get; set; }\n\n        /// <summary>\n        /// Gets or sets the collection of the aggregation labels\n        /// </summary>\n        [JsonProperty(PropertyName = \"labels\")]\n        public IList<AggregationLabel> Labels { get; set; }\n\n        /// <summary>\n        /// Gets or sets the collection of the aggregation items\n        /// </summary>\n        [JsonProperty(PropertyName = \"items\")]\n        public IList<AggregationItem> Items { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ProductIndexedSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the ProductIndexedSearchResult class.\n        /// </summary>\n        public ProductIndexedSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ProductIndexedSearchResult class.\n        /// </summary>\n        public ProductIndexedSearchResult(long? totalCount = default(long?), IList<CatalogProduct> items = default(IList<CatalogProduct>), IList<Aggregation> aggregations = default(IList<Aggregation>))\n        {\n            TotalCount = totalCount;\n            Items = items;\n            Aggregations = aggregations;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public long? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"items\")]\n        public IList<CatalogProduct> Items { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"aggregations\")]\n        public IList<Aggregation> Aggregations { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class CategoryIndexedSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the CategoryIndexedSearchCriteria\n        /// class.\n        /// </summary>\n        public CategoryIndexedSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CategoryIndexedSearchCriteria\n        /// class.\n        /// </summary>\n        /// <param name=\"outline\">CategoryId1/CategoryId2, no catalog should be\n        /// included in the outline</param>\n        /// <param name=\"outlines\">CategoryId1/CategoryId2, no catalog should\n        /// be included in the outline</param>\n        /// <param name=\"terms\">Term format: name:value1,value2</param>\n        /// <param name=\"userGroups\">Assigned groups for current user. Data\n        /// format: user_groups:value1,value2</param>\n        /// <param name=\"isFuzzySearch\">Enable fuzzy search, i.e. allow to\n        /// search color:white even if color:wihte actually passed to\n        /// criteria</param>\n        /// <param name=\"rawQuery\">Gets or sets the search provider specific\n        /// raw search query; all other search criteria will be ignored</param>\n        /// <param name=\"includeFields\">Allows to retrieve only a specific set\n        /// of fields in the result hits</param>\n        public CategoryIndexedSearchCriteria(string objectType = default(string), string storeId = default(string), string catalogId = default(string), string outline = default(string), IList<string> outlines = default(IList<string>), IList<string> terms = default(IList<string>), IList<string> userGroups = default(IList<string>), bool? isFuzzySearch = default(bool?), string rawQuery = default(string), IList<string> includeFields = default(IList<string>), string searchPhrase = default(string), string keyword = default(string), string responseGroup = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            ObjectType = objectType;\n            StoreId = storeId;\n            CatalogId = catalogId;\n            Outline = outline;\n            Outlines = outlines;\n            Terms = terms;\n            UserGroups = userGroups;\n            IsFuzzySearch = isFuzzySearch;\n            RawQuery = rawQuery;\n            IncludeFields = includeFields;\n            SearchPhrase = searchPhrase;\n            Keyword = keyword;\n            ResponseGroup = responseGroup;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeId\")]\n        public string StoreId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogId\")]\n        public string CatalogId { get; set; }\n\n        /// <summary>\n        /// Gets or sets categoryId1/CategoryId2, no catalog should be included\n        /// in the outline\n        /// </summary>\n        [JsonProperty(PropertyName = \"outline\")]\n        public string Outline { get; set; }\n\n        /// <summary>\n        /// Gets or sets categoryId1/CategoryId2, no catalog should be included\n        /// in the outline\n        /// </summary>\n        [JsonProperty(PropertyName = \"outlines\")]\n        public IList<string> Outlines { get; set; }\n\n        /// <summary>\n        /// Gets or sets term format: name:value1,value2\n        /// </summary>\n        [JsonProperty(PropertyName = \"terms\")]\n        public IList<string> Terms { get; set; }\n\n        /// <summary>\n        /// Gets or sets assigned groups for current user. Data format:\n        /// user_groups:value1,value2\n        /// </summary>\n        [JsonProperty(PropertyName = \"userGroups\")]\n        public IList<string> UserGroups { get; set; }\n\n        /// <summary>\n        /// Gets or sets enable fuzzy search, i.e. allow to search color:white\n        /// even if color:wihte actually passed to criteria\n        /// </summary>\n        [JsonProperty(PropertyName = \"isFuzzySearch\")]\n        public bool? IsFuzzySearch { get; set; }\n\n        /// <summary>\n        /// Gets or sets the search provider specific raw search query; all\n        /// other search criteria will be ignored\n        /// </summary>\n        [JsonProperty(PropertyName = \"rawQuery\")]\n        public string RawQuery { get; set; }\n\n        /// <summary>\n        /// Gets or sets allows to retrieve only a specific set of fields in\n        /// the result hits\n        /// </summary>\n        [JsonProperty(PropertyName = \"includeFields\")]\n        public IList<string> IncludeFields { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class CategoryIndexedSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the CategoryIndexedSearchResult\n        /// class.\n        /// </summary>\n        public CategoryIndexedSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CategoryIndexedSearchResult\n        /// class.\n        /// </summary>\n        public CategoryIndexedSearchResult(long? totalCount = default(long?), IList<Category> items = default(IList<Category>), IList<Aggregation> aggregations = default(IList<Aggregation>))\n        {\n            TotalCount = totalCount;\n            Items = items;\n            Aggregations = aggregations;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public long? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"items\")]\n        public IList<Category> Items { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"aggregations\")]\n        public IList<Aggregation> Aggregations { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class CatalogListEntrySearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the CatalogListEntrySearchCriteria\n        /// class.\n        /// </summary>\n        public CatalogListEntrySearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CatalogListEntrySearchCriteria\n        /// class.\n        /// </summary>\n        /// <param name=\"vendorId\">Search by vendor</param>\n        /// <param name=\"productType\">Search product with specified\n        /// type</param>\n        /// <param name=\"mainProductId\">Search within variations of specified\n        /// main product</param>\n        /// <param name=\"searchInChildren\">Search  in all children categories\n        /// for specified catalog or categories</param>\n        /// <param name=\"searchInVariations\">Also search in variations</param>\n        public CatalogListEntrySearchCriteria(string code = default(string), string vendorId = default(string), IList<string> vendorIds = default(IList<string>), string productType = default(string), IList<string> productTypes = default(IList<string>), bool? withHidden = default(bool?), bool? hideDirectLinkedCategories = default(bool?), string mainProductId = default(string), bool? searchInChildren = default(bool?), bool? searchInVariations = default(bool?), bool? onlyBuyable = default(bool?), bool? onlyWithTrackingInventory = default(bool?), string catalogId = default(string), IList<string> catalogIds = default(IList<string>), string categoryId = default(string), IList<string> categoryIds = default(IList<string>), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            Code = code;\n            VendorId = vendorId;\n            VendorIds = vendorIds;\n            ProductType = productType;\n            ProductTypes = productTypes;\n            WithHidden = withHidden;\n            HideDirectLinkedCategories = hideDirectLinkedCategories;\n            MainProductId = mainProductId;\n            SearchInChildren = searchInChildren;\n            SearchInVariations = searchInVariations;\n            OnlyBuyable = onlyBuyable;\n            OnlyWithTrackingInventory = onlyWithTrackingInventory;\n            CatalogId = catalogId;\n            CatalogIds = catalogIds;\n            CategoryId = categoryId;\n            CategoryIds = categoryIds;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"code\")]\n        public string Code { get; set; }\n\n        /// <summary>\n        /// Gets or sets search by vendor\n        /// </summary>\n        [JsonProperty(PropertyName = \"vendorId\")]\n        public string VendorId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"vendorIds\")]\n        public IList<string> VendorIds { get; set; }\n\n        /// <summary>\n        /// Gets or sets search product with specified type\n        /// </summary>\n        [JsonProperty(PropertyName = \"productType\")]\n        public string ProductType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"productTypes\")]\n        public IList<string> ProductTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"withHidden\")]\n        public bool? WithHidden { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"hideDirectLinkedCategories\")]\n        public bool? HideDirectLinkedCategories { get; set; }\n\n        /// <summary>\n        /// Gets or sets search within variations of specified main product\n        /// </summary>\n        [JsonProperty(PropertyName = \"mainProductId\")]\n        public string MainProductId { get; set; }\n\n        /// <summary>\n        /// Gets or sets search  in all children categories for specified\n        /// catalog or categories\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchInChildren\")]\n        public bool? SearchInChildren { get; set; }\n\n        /// <summary>\n        /// Gets or sets also search in variations\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchInVariations\")]\n        public bool? SearchInVariations { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"onlyBuyable\")]\n        public bool? OnlyBuyable { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"onlyWithTrackingInventory\")]\n        public bool? OnlyWithTrackingInventory { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogId\")]\n        public string CatalogId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogIds\")]\n        public IList<string> CatalogIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"categoryId\")]\n        public string CategoryId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"categoryIds\")]\n        public IList<string> CategoryIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Base class for all entries used in catalog categories browsing.\n    /// </summary>\n    public partial class ListEntryBase\n    {\n        /// <summary>\n        /// Initializes a new instance of the ListEntryBase class.\n        /// </summary>\n        public ListEntryBase()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ListEntryBase class.\n        /// </summary>\n        /// <param name=\"type\">Gets or sets the type. E.g. \"product\",\n        /// \"category\"</param>\n        /// <param name=\"isActive\">Gets or sets a value indicating whether this\n        /// entry is active.</param>\n        /// <param name=\"imageUrl\">Gets or sets the image URL.</param>\n        /// <param name=\"code\">Gets or sets the entry code.</param>\n        /// <param name=\"name\">Gets or sets the name.</param>\n        /// <param name=\"links\">Gets or sets the links.</param>\n        /// <param name=\"outline\">All entry parents ids</param>\n        /// <param name=\"path\">All entry parents names</param>\n        /// <param name=\"catalogId\">Gets or sets the catalog id.</param>\n        public ListEntryBase(string type = default(string), bool? isActive = default(bool?), string imageUrl = default(string), string code = default(string), string name = default(string), IList<CategoryLink> links = default(IList<CategoryLink>), IList<string> outline = default(IList<string>), IList<string> path = default(IList<string>), string catalogId = default(string), string seoObjectType = default(string), IList<SeoInfo> seoInfos = default(IList<SeoInfo>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Type = type;\n            IsActive = isActive;\n            ImageUrl = imageUrl;\n            Code = code;\n            Name = name;\n            Links = links;\n            Outline = outline;\n            Path = path;\n            CatalogId = catalogId;\n            SeoObjectType = seoObjectType;\n            SeoInfos = seoInfos;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets the type. E.g. \"product\", \"category\"\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n        /// <summary>\n        /// Gets or sets a value indicating whether this entry is active.\n        /// </summary>\n        [JsonProperty(PropertyName = \"isActive\")]\n        public bool? IsActive { get; set; }\n\n        /// <summary>\n        /// Gets or sets the image URL.\n        /// </summary>\n        [JsonProperty(PropertyName = \"imageUrl\")]\n        public string ImageUrl { get; set; }\n\n        /// <summary>\n        /// Gets or sets the entry code.\n        /// </summary>\n        [JsonProperty(PropertyName = \"code\")]\n        public string Code { get; set; }\n\n        /// <summary>\n        /// Gets or sets the name.\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Gets or sets the links.\n        /// </summary>\n        [JsonProperty(PropertyName = \"links\")]\n        public IList<CategoryLink> Links { get; set; }\n\n        /// <summary>\n        /// Gets or sets all entry parents ids\n        /// </summary>\n        [JsonProperty(PropertyName = \"outline\")]\n        public IList<string> Outline { get; set; }\n\n        /// <summary>\n        /// Gets or sets all entry parents names\n        /// </summary>\n        [JsonProperty(PropertyName = \"path\")]\n        public IList<string> Path { get; set; }\n\n        /// <summary>\n        /// Gets or sets the catalog id.\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogId\")]\n        public string CatalogId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoObjectType\")]\n        public string SeoObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoInfos\")]\n        public IList<SeoInfo> SeoInfos { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ListEntrySearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the ListEntrySearchResult class.\n        /// </summary>\n        public ListEntrySearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ListEntrySearchResult class.\n        /// </summary>\n        /// <param name=\"listEntries\">Gets or sets the list entries.</param>\n        public ListEntrySearchResult(IList<ListEntryBase> listEntries = default(IList<ListEntryBase>), int? totalCount = default(int?), IList<ListEntryBase> results = default(IList<ListEntryBase>))\n        {\n            ListEntries = listEntries;\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets the list entries.\n        /// </summary>\n        [JsonProperty(PropertyName = \"listEntries\")]\n        public IList<ListEntryBase> ListEntries { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<ListEntryBase> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Information to search and create links to categories and items\n    /// </summary>\n    public partial class BulkLinkCreationRequest\n    {\n        /// <summary>\n        /// Initializes a new instance of the BulkLinkCreationRequest class.\n        /// </summary>\n        public BulkLinkCreationRequest()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the BulkLinkCreationRequest class.\n        /// </summary>\n        /// <param name=\"categoryId\">The target category identifier for the\n        /// link</param>\n        /// <param name=\"catalogId\">The target catalog identifier for the\n        /// link</param>\n        public BulkLinkCreationRequest(CatalogListEntrySearchCriteria searchCriteria = default(CatalogListEntrySearchCriteria), string categoryId = default(string), string catalogId = default(string))\n        {\n            SearchCriteria = searchCriteria;\n            CategoryId = categoryId;\n            CatalogId = catalogId;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchCriteria\")]\n        public CatalogListEntrySearchCriteria SearchCriteria { get; set; }\n\n        /// <summary>\n        /// Gets or sets the target category identifier for the link\n        /// </summary>\n        [JsonProperty(PropertyName = \"categoryId\")]\n        public string CategoryId { get; set; }\n\n        /// <summary>\n        /// Gets or sets the target catalog identifier for the link\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogId\")]\n        public string CatalogId { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Represents  move list entries command\n    /// </summary>\n    public partial class ListEntriesMoveRequest\n    {\n        /// <summary>\n        /// Initializes a new instance of the ListEntriesMoveRequest class.\n        /// </summary>\n        public ListEntriesMoveRequest()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ListEntriesMoveRequest class.\n        /// </summary>\n        public ListEntriesMoveRequest(string catalog = default(string), string catalogId = default(string), string category = default(string), IList<ListEntryBase> listEntries = default(IList<ListEntryBase>))\n        {\n            Catalog = catalog;\n            CatalogId = catalogId;\n            Category = category;\n            ListEntries = listEntries;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalog\")]\n        public string Catalog { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogId\")]\n        public string CatalogId { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"category\")]\n        public string Category { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"listEntries\")]\n        public IList<ListEntryBase> ListEntries { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Search criteria used for search property dictionary items\n    /// </summary>\n    public partial class PropertyDictionaryItemSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the\n        /// PropertyDictionaryItemSearchCriteria class.\n        /// </summary>\n        public PropertyDictionaryItemSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the\n        /// PropertyDictionaryItemSearchCriteria class.\n        /// </summary>\n        public PropertyDictionaryItemSearchCriteria(IList<string> propertyIds = default(IList<string>), IList<string> catalogIds = default(IList<string>), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            PropertyIds = propertyIds;\n            CatalogIds = catalogIds;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyIds\")]\n        public IList<string> PropertyIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalogIds\")]\n        public IList<string> CatalogIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/AutoRestClients/ContentModuleApi.cs",
    "content": "// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ContentModuleClient : ServiceClient<ContentModuleClient>, IContentModuleClient\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        public System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        public JsonSerializerSettings SerializationSettings { get; private set; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        public JsonSerializerSettings DeserializationSettings { get; private set; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client subscription.\n        /// </summary>\n        public ServiceClientCredentials Credentials { get; private set; }\n\n        /// <summary>\n        /// Gets the IContent.\n        /// </summary>\n        public virtual IContent Content { get; private set; }\n\n        /// <summary>\n        /// Gets the IMenu.\n        /// </summary>\n        public virtual IMenu Menu { get; private set; }\n\n        /// <summary>\n        /// Initializes a new instance of the ContentModuleClient class.\n        /// </summary>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling ContentModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        protected ContentModuleClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ContentModuleClient class.\n        /// </summary>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected ContentModuleClient(params DelegatingHandler[] handlers) : base(handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ContentModuleClient class.\n        /// </summary>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected ContentModuleClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ContentModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected ContentModuleClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ContentModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected ContentModuleClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ContentModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public ContentModuleClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ContentModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling ContentModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public ContentModuleClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ContentModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public ContentModuleClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ContentModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public ContentModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ContentModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public ContentModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// An optional partial-method to perform custom initialization.\n        ///</summary>\n        partial void CustomInitialize();\n        /// <summary>\n        /// Initializes client properties.\n        /// </summary>\n        private void Initialize()\n        {\n            Content = new Content(this);\n            Menu = new Menu(this);\n            BaseUri = new System.Uri(\"http://localhost\");\n            SerializationSettings = new JsonSerializerSettings\n            {\n                Formatting = Newtonsoft.Json.Formatting.Indented,\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new  List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            DeserializationSettings = new JsonSerializerSettings\n            {\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            CustomInitialize();\n        }\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// </summary>\n    public partial interface IContentModuleClient : System.IDisposable\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        JsonSerializerSettings SerializationSettings { get; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        JsonSerializerSettings DeserializationSettings { get; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client\n        /// subscription.\n        /// </summary>\n        ServiceClientCredentials Credentials { get; }\n\n\n        /// <summary>\n        /// Gets the IContent.\n        /// </summary>\n        IContent Content { get; }\n\n        /// <summary>\n        /// Gets the IMenu.\n        /// </summary>\n        IMenu Menu { get; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Content operations.\n    /// </summary>\n    public partial class Content : IServiceOperations<ContentModuleClient>, IContent\n    {\n        /// <summary>\n        /// Initializes a new instance of the Content class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public Content(ContentModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the ContentModuleClient\n        /// </summary>\n        public ContentModuleClient Client { get; private set; }\n\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ContentStatistic>> GetStoreContentStatsWithHttpMessagesAsync(string storeId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (storeId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"storeId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetStoreContentStats\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/content/{storeId}/stats\").ToString();\n            _url = _url.Replace(\"{storeId}\", System.Uri.EscapeDataString(storeId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ContentStatistic>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ContentStatistic>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='contentType'>\n        /// </param>\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='urls'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteContentWithHttpMessagesAsync(string contentType, string storeId, IList<string> urls = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (contentType == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"contentType\");\n            }\n            if (storeId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"storeId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"contentType\", contentType);\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"urls\", urls);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteContent\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/content/{contentType}/{storeId}\").ToString();\n            _url = _url.Replace(\"{contentType}\", System.Uri.EscapeDataString(contentType));\n            _url = _url.Replace(\"{storeId}\", System.Uri.EscapeDataString(storeId));\n            List<string> _queryParameters = new List<string>();\n            if (urls != null)\n            {\n                _queryParameters.Add(string.Format(\"urls={0}\", System.Uri.EscapeDataString(string.Join(\",\", urls))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='contentType'>\n        /// </param>\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='relativeUrl'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<byte[]>> GetContentItemDataStreamWithHttpMessagesAsync(string contentType, string storeId, string relativeUrl = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (contentType == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"contentType\");\n            }\n            if (storeId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"storeId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"contentType\", contentType);\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"relativeUrl\", relativeUrl);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetContentItemDataStream\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/content/{contentType}/{storeId}\").ToString();\n            _url = _url.Replace(\"{contentType}\", System.Uri.EscapeDataString(contentType));\n            _url = _url.Replace(\"{storeId}\", System.Uri.EscapeDataString(storeId));\n            List<string> _queryParameters = new List<string>();\n            if (relativeUrl != null)\n            {\n                _queryParameters.Add(string.Format(\"relativeUrl={0}\", System.Uri.EscapeDataString(relativeUrl)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<byte[]>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<byte[]>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='contentType'>\n        /// </param>\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='folderUrl'>\n        /// </param>\n        /// <param name='url'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<ContentItem>>> UploadContentWithHttpMessagesAsync(string contentType, string storeId, string folderUrl = default(string), string url = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (contentType == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"contentType\");\n            }\n            if (storeId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"storeId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"contentType\", contentType);\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"folderUrl\", folderUrl);\n                tracingParameters.Add(\"url\", url);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UploadContent\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/content/{contentType}/{storeId}\").ToString();\n            _url = _url.Replace(\"{contentType}\", System.Uri.EscapeDataString(contentType));\n            _url = _url.Replace(\"{storeId}\", System.Uri.EscapeDataString(storeId));\n            List<string> _queryParameters = new List<string>();\n            if (folderUrl != null)\n            {\n                _queryParameters.Add(string.Format(\"folderUrl={0}\", System.Uri.EscapeDataString(folderUrl)));\n            }\n            if (url != null)\n            {\n                _queryParameters.Add(string.Format(\"url={0}\", System.Uri.EscapeDataString(url)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<ContentItem>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<ContentItem>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='contentType'>\n        /// </param>\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='folderUrl'>\n        /// </param>\n        /// <param name='keyword'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<ContentItem>>> SearchContentWithHttpMessagesAsync(string contentType, string storeId, string folderUrl = default(string), string keyword = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (contentType == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"contentType\");\n            }\n            if (storeId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"storeId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"contentType\", contentType);\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"folderUrl\", folderUrl);\n                tracingParameters.Add(\"keyword\", keyword);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchContent\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/content/{contentType}/{storeId}/search\").ToString();\n            _url = _url.Replace(\"{contentType}\", System.Uri.EscapeDataString(contentType));\n            _url = _url.Replace(\"{storeId}\", System.Uri.EscapeDataString(storeId));\n            List<string> _queryParameters = new List<string>();\n            if (folderUrl != null)\n            {\n                _queryParameters.Add(string.Format(\"folderUrl={0}\", System.Uri.EscapeDataString(folderUrl)));\n            }\n            if (keyword != null)\n            {\n                _queryParameters.Add(string.Format(\"keyword={0}\", System.Uri.EscapeDataString(keyword)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<ContentItem>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<ContentItem>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='contentType'>\n        /// </param>\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='oldUrl'>\n        /// </param>\n        /// <param name='newUrl'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> MoveContentWithHttpMessagesAsync(string contentType, string storeId, string oldUrl = default(string), string newUrl = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (contentType == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"contentType\");\n            }\n            if (storeId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"storeId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"contentType\", contentType);\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"oldUrl\", oldUrl);\n                tracingParameters.Add(\"newUrl\", newUrl);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"MoveContent\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/content/{contentType}/{storeId}/move\").ToString();\n            _url = _url.Replace(\"{contentType}\", System.Uri.EscapeDataString(contentType));\n            _url = _url.Replace(\"{storeId}\", System.Uri.EscapeDataString(storeId));\n            List<string> _queryParameters = new List<string>();\n            if (oldUrl != null)\n            {\n                _queryParameters.Add(string.Format(\"oldUrl={0}\", System.Uri.EscapeDataString(oldUrl)));\n            }\n            if (newUrl != null)\n            {\n                _queryParameters.Add(string.Format(\"newUrl={0}\", System.Uri.EscapeDataString(newUrl)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='srcPath'>\n        /// </param>\n        /// <param name='destPath'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> CopyContentWithHttpMessagesAsync(string srcPath = default(string), string destPath = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"srcPath\", srcPath);\n                tracingParameters.Add(\"destPath\", destPath);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CopyContent\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/content/copy\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (srcPath != null)\n            {\n                _queryParameters.Add(string.Format(\"srcPath={0}\", System.Uri.EscapeDataString(srcPath)));\n            }\n            if (destPath != null)\n            {\n                _queryParameters.Add(string.Format(\"destPath={0}\", System.Uri.EscapeDataString(destPath)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='contentType'>\n        /// </param>\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='archivePath'>\n        /// </param>\n        /// <param name='destPath'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UnpackWithHttpMessagesAsync(string contentType, string storeId, string archivePath = default(string), string destPath = \"default\", Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (contentType == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"contentType\");\n            }\n            if (storeId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"storeId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"contentType\", contentType);\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"archivePath\", archivePath);\n                tracingParameters.Add(\"destPath\", destPath);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"Unpack\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/content/{contentType}/{storeId}/unpack\").ToString();\n            _url = _url.Replace(\"{contentType}\", System.Uri.EscapeDataString(contentType));\n            _url = _url.Replace(\"{storeId}\", System.Uri.EscapeDataString(storeId));\n            List<string> _queryParameters = new List<string>();\n            if (archivePath != null)\n            {\n                _queryParameters.Add(string.Format(\"archivePath={0}\", System.Uri.EscapeDataString(archivePath)));\n            }\n            if (destPath != null)\n            {\n                _queryParameters.Add(string.Format(\"destPath={0}\", System.Uri.EscapeDataString(destPath)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='contentType'>\n        /// </param>\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> CreateContentFolderWithHttpMessagesAsync(string contentType, string storeId, ContentFolder body = default(ContentFolder), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (contentType == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"contentType\");\n            }\n            if (storeId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"storeId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"contentType\", contentType);\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CreateContentFolder\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/content/{contentType}/{storeId}/folder\").ToString();\n            _url = _url.Replace(\"{contentType}\", System.Uri.EscapeDataString(contentType));\n            _url = _url.Replace(\"{storeId}\", System.Uri.EscapeDataString(storeId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Content operations.\n    /// </summary>\n    public partial interface IContent\n    {\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<ContentStatistic>> GetStoreContentStatsWithHttpMessagesAsync(string storeId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='contentType'>\n        /// </param>\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='urls'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse> DeleteContentWithHttpMessagesAsync(string contentType, string storeId, IList<string> urls = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='contentType'>\n        /// </param>\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='relativeUrl'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<byte[]>> GetContentItemDataStreamWithHttpMessagesAsync(string contentType, string storeId, string relativeUrl = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='contentType'>\n        /// </param>\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='folderUrl'>\n        /// </param>\n        /// <param name='url'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<IList<ContentItem>>> UploadContentWithHttpMessagesAsync(string contentType, string storeId, string folderUrl = default(string), string url = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='contentType'>\n        /// </param>\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='folderUrl'>\n        /// </param>\n        /// <param name='keyword'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<IList<ContentItem>>> SearchContentWithHttpMessagesAsync(string contentType, string storeId, string folderUrl = default(string), string keyword = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='contentType'>\n        /// </param>\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='oldUrl'>\n        /// </param>\n        /// <param name='newUrl'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse> MoveContentWithHttpMessagesAsync(string contentType, string storeId, string oldUrl = default(string), string newUrl = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='srcPath'>\n        /// </param>\n        /// <param name='destPath'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> CopyContentWithHttpMessagesAsync(string srcPath = default(string), string destPath = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='contentType'>\n        /// </param>\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='archivePath'>\n        /// </param>\n        /// <param name='destPath'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse> UnpackWithHttpMessagesAsync(string contentType, string storeId, string archivePath = default(string), string destPath = \"default\", Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='contentType'>\n        /// </param>\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse> CreateContentFolderWithHttpMessagesAsync(string contentType, string storeId, ContentFolder body = default(ContentFolder), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for Content.\n    /// </summary>\n    public static partial class ContentExtensions\n    {\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            public static ContentStatistic GetStoreContentStats(this IContent operations, string storeId)\n            {\n                return operations.GetStoreContentStatsAsync(storeId).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ContentStatistic> GetStoreContentStatsAsync(this IContent operations, string storeId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetStoreContentStatsWithHttpMessagesAsync(storeId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='contentType'>\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='urls'>\n            /// </param>\n            public static void DeleteContent(this IContent operations, string contentType, string storeId, IList<string> urls = default(IList<string>))\n            {\n                operations.DeleteContentAsync(contentType, storeId, urls).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='contentType'>\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='urls'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteContentAsync(this IContent operations, string contentType, string storeId, IList<string> urls = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteContentWithHttpMessagesAsync(contentType, storeId, urls, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='contentType'>\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='relativeUrl'>\n            /// </param>\n            public static byte[] GetContentItemDataStream(this IContent operations, string contentType, string storeId, string relativeUrl = default(string))\n            {\n                return operations.GetContentItemDataStreamAsync(contentType, storeId, relativeUrl).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='contentType'>\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='relativeUrl'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<byte[]> GetContentItemDataStreamAsync(this IContent operations, string contentType, string storeId, string relativeUrl = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetContentItemDataStreamWithHttpMessagesAsync(contentType, storeId, relativeUrl, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='contentType'>\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='folderUrl'>\n            /// </param>\n            /// <param name='url'>\n            /// </param>\n            public static IList<ContentItem> UploadContent(this IContent operations, string contentType, string storeId, string folderUrl = default(string), string url = default(string))\n            {\n                return operations.UploadContentAsync(contentType, storeId, folderUrl, url).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='contentType'>\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='folderUrl'>\n            /// </param>\n            /// <param name='url'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<ContentItem>> UploadContentAsync(this IContent operations, string contentType, string storeId, string folderUrl = default(string), string url = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.UploadContentWithHttpMessagesAsync(contentType, storeId, folderUrl, url, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='contentType'>\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='folderUrl'>\n            /// </param>\n            /// <param name='keyword'>\n            /// </param>\n            public static IList<ContentItem> SearchContent(this IContent operations, string contentType, string storeId, string folderUrl = default(string), string keyword = default(string))\n            {\n                return operations.SearchContentAsync(contentType, storeId, folderUrl, keyword).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='contentType'>\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='folderUrl'>\n            /// </param>\n            /// <param name='keyword'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<ContentItem>> SearchContentAsync(this IContent operations, string contentType, string storeId, string folderUrl = default(string), string keyword = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchContentWithHttpMessagesAsync(contentType, storeId, folderUrl, keyword, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='contentType'>\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='oldUrl'>\n            /// </param>\n            /// <param name='newUrl'>\n            /// </param>\n            public static void MoveContent(this IContent operations, string contentType, string storeId, string oldUrl = default(string), string newUrl = default(string))\n            {\n                operations.MoveContentAsync(contentType, storeId, oldUrl, newUrl).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='contentType'>\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='oldUrl'>\n            /// </param>\n            /// <param name='newUrl'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task MoveContentAsync(this IContent operations, string contentType, string storeId, string oldUrl = default(string), string newUrl = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.MoveContentWithHttpMessagesAsync(contentType, storeId, oldUrl, newUrl, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='srcPath'>\n            /// </param>\n            /// <param name='destPath'>\n            /// </param>\n            public static void CopyContent(this IContent operations, string srcPath = default(string), string destPath = default(string))\n            {\n                operations.CopyContentAsync(srcPath, destPath).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='srcPath'>\n            /// </param>\n            /// <param name='destPath'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task CopyContentAsync(this IContent operations, string srcPath = default(string), string destPath = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.CopyContentWithHttpMessagesAsync(srcPath, destPath, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='contentType'>\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='archivePath'>\n            /// </param>\n            /// <param name='destPath'>\n            /// </param>\n            public static void Unpack(this IContent operations, string contentType, string storeId, string archivePath = default(string), string destPath = \"default\")\n            {\n                operations.UnpackAsync(contentType, storeId, archivePath, destPath).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='contentType'>\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='archivePath'>\n            /// </param>\n            /// <param name='destPath'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UnpackAsync(this IContent operations, string contentType, string storeId, string archivePath = default(string), string destPath = \"default\", CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UnpackWithHttpMessagesAsync(contentType, storeId, archivePath, destPath, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='contentType'>\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void CreateContentFolder(this IContent operations, string contentType, string storeId, ContentFolder body = default(ContentFolder))\n            {\n                operations.CreateContentFolderAsync(contentType, storeId, body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='contentType'>\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task CreateContentFolderAsync(this IContent operations, string contentType, string storeId, ContentFolder body = default(ContentFolder), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.CreateContentFolderWithHttpMessagesAsync(contentType, storeId, body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Menu operations.\n    /// </summary>\n    public partial class Menu : IServiceOperations<ContentModuleClient>, IMenu\n    {\n        /// <summary>\n        /// Initializes a new instance of the Menu class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public Menu(ContentModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the ContentModuleClient\n        /// </summary>\n        public ContentModuleClient Client { get; private set; }\n\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<MenuLinkList>>> GetListsWithHttpMessagesAsync(string storeId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (storeId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"storeId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetLists\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/cms/{storeId}/menu\").ToString();\n            _url = _url.Replace(\"{storeId}\", System.Uri.EscapeDataString(storeId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<MenuLinkList>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<MenuLinkList>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UpdateMenuLinkListWithHttpMessagesAsync(string storeId, MenuLinkList body = default(MenuLinkList), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (storeId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"storeId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdateMenuLinkList\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/cms/{storeId}/menu\").ToString();\n            _url = _url.Replace(\"{storeId}\", System.Uri.EscapeDataString(storeId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='listIds'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteMenuLinkListsWithHttpMessagesAsync(string storeId, IList<string> listIds = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (storeId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"storeId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"listIds\", listIds);\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteMenuLinkLists\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/cms/{storeId}/menu\").ToString();\n            _url = _url.Replace(\"{storeId}\", System.Uri.EscapeDataString(storeId));\n            List<string> _queryParameters = new List<string>();\n            if (listIds != null)\n            {\n                _queryParameters.Add(string.Format(\"listIds={0}\", System.Uri.EscapeDataString(string.Join(\",\", listIds))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='listId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<MenuLinkList>> GetListWithHttpMessagesAsync(string storeId, string listId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (storeId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"storeId\");\n            }\n            if (listId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"listId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"listId\", listId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetList\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/cms/{storeId}/menu/{listId}\").ToString();\n            _url = _url.Replace(\"{storeId}\", System.Uri.EscapeDataString(storeId));\n            _url = _url.Replace(\"{listId}\", System.Uri.EscapeDataString(listId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<MenuLinkList>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<MenuLinkList>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='name'>\n        /// </param>\n        /// <param name='language'>\n        /// </param>\n        /// <param name='id'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<bool?>> CheckNameWithHttpMessagesAsync(string storeId, string name = default(string), string language = \"\", string id = \"\", Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (storeId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"storeId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"name\", name);\n                tracingParameters.Add(\"language\", language);\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CheckName\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/cms/{storeId}/menu/checkname\").ToString();\n            _url = _url.Replace(\"{storeId}\", System.Uri.EscapeDataString(storeId));\n            List<string> _queryParameters = new List<string>();\n            if (name != null)\n            {\n                _queryParameters.Add(string.Format(\"name={0}\", System.Uri.EscapeDataString(name)));\n            }\n            if (language != null)\n            {\n                _queryParameters.Add(string.Format(\"language={0}\", System.Uri.EscapeDataString(language)));\n            }\n            if (id != null)\n            {\n                _queryParameters.Add(string.Format(\"id={0}\", System.Uri.EscapeDataString(id)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<bool?>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<bool?>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Menu operations.\n    /// </summary>\n    public partial interface IMenu\n    {\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<IList<MenuLinkList>>> GetListsWithHttpMessagesAsync(string storeId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse> UpdateMenuLinkListWithHttpMessagesAsync(string storeId, MenuLinkList body = default(MenuLinkList), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='listIds'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse> DeleteMenuLinkListsWithHttpMessagesAsync(string storeId, IList<string> listIds = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='listId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<MenuLinkList>> GetListWithHttpMessagesAsync(string storeId, string listId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='name'>\n        /// </param>\n        /// <param name='language'>\n        /// </param>\n        /// <param name='id'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<bool?>> CheckNameWithHttpMessagesAsync(string storeId, string name = default(string), string language = \"\", string id = \"\", Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for Menu.\n    /// </summary>\n    public static partial class MenuExtensions\n    {\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            public static IList<MenuLinkList> GetLists(this IMenu operations, string storeId)\n            {\n                return operations.GetListsAsync(storeId).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<MenuLinkList>> GetListsAsync(this IMenu operations, string storeId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetListsWithHttpMessagesAsync(storeId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void UpdateMenuLinkList(this IMenu operations, string storeId, MenuLinkList body = default(MenuLinkList))\n            {\n                operations.UpdateMenuLinkListAsync(storeId, body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UpdateMenuLinkListAsync(this IMenu operations, string storeId, MenuLinkList body = default(MenuLinkList), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UpdateMenuLinkListWithHttpMessagesAsync(storeId, body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='listIds'>\n            /// </param>\n            public static void DeleteMenuLinkLists(this IMenu operations, string storeId, IList<string> listIds = default(IList<string>))\n            {\n                operations.DeleteMenuLinkListsAsync(storeId, listIds).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='listIds'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteMenuLinkListsAsync(this IMenu operations, string storeId, IList<string> listIds = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteMenuLinkListsWithHttpMessagesAsync(storeId, listIds, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='listId'>\n            /// </param>\n            public static MenuLinkList GetList(this IMenu operations, string storeId, string listId)\n            {\n                return operations.GetListAsync(storeId, listId).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='listId'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<MenuLinkList> GetListAsync(this IMenu operations, string storeId, string listId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetListWithHttpMessagesAsync(storeId, listId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='name'>\n            /// </param>\n            /// <param name='language'>\n            /// </param>\n            /// <param name='id'>\n            /// </param>\n            public static bool? CheckName(this IMenu operations, string storeId, string name = default(string), string language = \"\", string id = \"\")\n            {\n                return operations.CheckNameAsync(storeId, name, language, id).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='name'>\n            /// </param>\n            /// <param name='language'>\n            /// </param>\n            /// <param name='id'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<bool?> CheckNameAsync(this IMenu operations, string storeId, string name = default(string), string language = \"\", string id = \"\", CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.CheckNameWithHttpMessagesAsync(storeId, name, language, id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ContentItem\n    {\n        /// <summary>\n        /// Initializes a new instance of the ContentItem class.\n        /// </summary>\n        public ContentItem()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ContentItem class.\n        /// </summary>\n        public ContentItem(string name = default(string), string type = default(string), string url = default(string), string relativeUrl = default(string), string parentUrl = default(string), System.DateTime? modifiedDate = default(System.DateTime?), System.DateTime? createdDate = default(System.DateTime?))\n        {\n            Name = name;\n            Type = type;\n            Url = url;\n            RelativeUrl = relativeUrl;\n            ParentUrl = parentUrl;\n            ModifiedDate = modifiedDate;\n            CreatedDate = createdDate;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"url\")]\n        public string Url { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"relativeUrl\")]\n        public string RelativeUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"parentUrl\")]\n        public string ParentUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class MenuLink\n    {\n        /// <summary>\n        /// Initializes a new instance of the MenuLink class.\n        /// </summary>\n        public MenuLink()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the MenuLink class.\n        /// </summary>\n        public MenuLink(string title = default(string), string url = default(string), int? priority = default(int?), string menuLinkListId = default(string), string associatedObjectId = default(string), string associatedObjectName = default(string), string associatedObjectType = default(string), IList<string> securityScopes = default(IList<string>), string outerId = default(string), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Title = title;\n            Url = url;\n            Priority = priority;\n            MenuLinkListId = menuLinkListId;\n            AssociatedObjectId = associatedObjectId;\n            AssociatedObjectName = associatedObjectName;\n            AssociatedObjectType = associatedObjectType;\n            SecurityScopes = securityScopes;\n            OuterId = outerId;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"title\")]\n        public string Title { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"url\")]\n        public string Url { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"priority\")]\n        public int? Priority { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"menuLinkListId\")]\n        public string MenuLinkListId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"associatedObjectId\")]\n        public string AssociatedObjectId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"associatedObjectName\")]\n        public string AssociatedObjectName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"associatedObjectType\")]\n        public string AssociatedObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"securityScopes\")]\n        public IList<string> SecurityScopes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class MenuLinkList\n    {\n        /// <summary>\n        /// Initializes a new instance of the MenuLinkList class.\n        /// </summary>\n        public MenuLinkList()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the MenuLinkList class.\n        /// </summary>\n        public MenuLinkList(string name = default(string), string storeId = default(string), string language = default(string), IList<MenuLink> menuLinks = default(IList<MenuLink>), IList<string> securityScopes = default(IList<string>), string outerId = default(string), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Name = name;\n            StoreId = storeId;\n            Language = language;\n            MenuLinks = menuLinks;\n            SecurityScopes = securityScopes;\n            OuterId = outerId;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeId\")]\n        public string StoreId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"language\")]\n        public string Language { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"menuLinks\")]\n        public IList<MenuLink> MenuLinks { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"securityScopes\")]\n        public IList<string> SecurityScopes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ContentStatistic\n    {\n        /// <summary>\n        /// Initializes a new instance of the ContentStatistic class.\n        /// </summary>\n        public ContentStatistic()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ContentStatistic class.\n        /// </summary>\n        public ContentStatistic(string activeThemeName = default(string), int? themesCount = default(int?), int? pagesCount = default(int?), int? blogsCount = default(int?))\n        {\n            ActiveThemeName = activeThemeName;\n            ThemesCount = themesCount;\n            PagesCount = pagesCount;\n            BlogsCount = blogsCount;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"activeThemeName\")]\n        public string ActiveThemeName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"themesCount\")]\n        public int? ThemesCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"pagesCount\")]\n        public int? PagesCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"blogsCount\")]\n        public int? BlogsCount { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ContentFolder\n    {\n        /// <summary>\n        /// Initializes a new instance of the ContentFolder class.\n        /// </summary>\n        public ContentFolder()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ContentFolder class.\n        /// </summary>\n        public ContentFolder(string name = default(string), string type = default(string), string url = default(string), string relativeUrl = default(string), string parentUrl = default(string), System.DateTime? modifiedDate = default(System.DateTime?), System.DateTime? createdDate = default(System.DateTime?))\n        {\n            Name = name;\n            Type = type;\n            Url = url;\n            RelativeUrl = relativeUrl;\n            ParentUrl = parentUrl;\n            ModifiedDate = modifiedDate;\n            CreatedDate = createdDate;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"url\")]\n        public string Url { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"relativeUrl\")]\n        public string RelativeUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"parentUrl\")]\n        public string ParentUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/AutoRestClients/CoreModuleApi.cs",
    "content": "// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class CoreModuleClient : ServiceClient<CoreModuleClient>, ICoreModuleClient\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        public System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        public JsonSerializerSettings SerializationSettings { get; private set; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        public JsonSerializerSettings DeserializationSettings { get; private set; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client subscription.\n        /// </summary>\n        public ServiceClientCredentials Credentials { get; private set; }\n\n        /// <summary>\n        /// Gets the ICommerce.\n        /// </summary>\n        public virtual ICommerce Commerce { get; private set; }\n\n        /// <summary>\n        /// Initializes a new instance of the CoreModuleClient class.\n        /// </summary>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling CoreModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        protected CoreModuleClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CoreModuleClient class.\n        /// </summary>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected CoreModuleClient(params DelegatingHandler[] handlers) : base(handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CoreModuleClient class.\n        /// </summary>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected CoreModuleClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CoreModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected CoreModuleClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CoreModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected CoreModuleClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CoreModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CoreModuleClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CoreModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling CoreModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CoreModuleClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CoreModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CoreModuleClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CoreModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CoreModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CoreModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CoreModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// An optional partial-method to perform custom initialization.\n        ///</summary>\n        partial void CustomInitialize();\n        /// <summary>\n        /// Initializes client properties.\n        /// </summary>\n        private void Initialize()\n        {\n            Commerce = new Commerce(this);\n            BaseUri = new System.Uri(\"http://localhost\");\n            SerializationSettings = new JsonSerializerSettings\n            {\n                Formatting = Newtonsoft.Json.Formatting.Indented,\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new  List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            DeserializationSettings = new JsonSerializerSettings\n            {\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            CustomInitialize();\n        }\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// </summary>\n    public partial interface ICoreModuleClient : System.IDisposable\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        JsonSerializerSettings SerializationSettings { get; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        JsonSerializerSettings DeserializationSettings { get; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client\n        /// subscription.\n        /// </summary>\n        ServiceClientCredentials Credentials { get; }\n\n\n        /// <summary>\n        /// Gets the ICommerce.\n        /// </summary>\n        ICommerce Commerce { get; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Commerce operations.\n    /// </summary>\n    public partial class Commerce : IServiceOperations<CoreModuleClient>, ICommerce\n    {\n        /// <summary>\n        /// Initializes a new instance of the Commerce class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public Commerce(CoreModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the CoreModuleClient\n        /// </summary>\n        public CoreModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Batch create or update seo infos\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> BatchUpdateSeoInfosWithHttpMessagesAsync(IList<SeoInfo> body = default(IList<SeoInfo>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"BatchUpdateSeoInfos\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/seoinfos/batchupdate\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='objectId'>\n        /// </param>\n        /// <param name='objectType'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<SeoInfo>>> GetSeoDuplicatesWithHttpMessagesAsync(string objectId = default(string), string objectType = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"objectId\", objectId);\n                tracingParameters.Add(\"objectType\", objectType);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetSeoDuplicates\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/seoinfos/duplicates\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (objectId != null)\n            {\n                _queryParameters.Add(string.Format(\"objectId={0}\", System.Uri.EscapeDataString(objectId)));\n            }\n            if (objectType != null)\n            {\n                _queryParameters.Add(string.Format(\"objectType={0}\", System.Uri.EscapeDataString(objectType)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<SeoInfo>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<SeoInfo>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Find all SEO records for object by slug\n        /// </summary>\n        /// <param name='slug'>\n        /// slug\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<SeoInfo>>> GetSeoInfoBySlugWithHttpMessagesAsync(string slug, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (slug == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"slug\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"slug\", slug);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetSeoInfoBySlug\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/seoinfos/{slug}\").ToString();\n            _url = _url.Replace(\"{slug}\", System.Uri.EscapeDataString(slug));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<SeoInfo>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<SeoInfo>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Return all currencies registered in the system\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Currency>>> GetAllCurrenciesWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetAllCurrencies\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/currencies\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Currency>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Currency>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Create a existing currency\n        /// </summary>\n        /// <param name='body'>\n        /// currency\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> CreateCurrencyWithHttpMessagesAsync(Currency body = default(Currency), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CreateCurrency\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/currencies\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Update a existing currency\n        /// </summary>\n        /// <param name='body'>\n        /// currency\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UpdateCurrencyWithHttpMessagesAsync(Currency body = default(Currency), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdateCurrency\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/currencies\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Delete currencies\n        /// </summary>\n        /// <param name='codes'>\n        /// currency codes\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteCurrenciesWithHttpMessagesAsync(IList<string> codes = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"codes\", codes);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteCurrencies\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/currencies\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (codes != null)\n            {\n                _queryParameters.Add(string.Format(\"codes={0}\", System.Uri.EscapeDataString(string.Join(\",\", codes))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Return all package types registered in the system\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<PackageType>>> GetAllPackageTypesWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetAllPackageTypes\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/packageTypes\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<PackageType>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<PackageType>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Update a existing package type\n        /// </summary>\n        /// <param name='body'>\n        /// package type\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UpdatePackageTypeWithHttpMessagesAsync(PackageType body = default(PackageType), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdatePackageType\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/packageTypes\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Create new package type\n        /// </summary>\n        /// <param name='body'>\n        /// package type\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> CreatePackageTypeWithHttpMessagesAsync(PackageType body = default(PackageType), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CreatePackageType\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/packageTypes\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Delete package types\n        /// </summary>\n        /// <param name='ids'>\n        /// package type ids\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeletePackageTypesWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeletePackageTypes\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/packageTypes\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Join(\",\", ids))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Validate address (reserved for future) and also required for expose Address\n        /// in OpenAPI swagger docs\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<bool?>> ValidateAddressWithHttpMessagesAsync(Address body = default(Address), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ValidateAddress\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<bool?>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<bool?>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Commerce operations.\n    /// </summary>\n    public partial interface ICommerce\n    {\n        /// <summary>\n        /// Batch create or update seo infos\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> BatchUpdateSeoInfosWithHttpMessagesAsync(IList<SeoInfo> body = default(IList<SeoInfo>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='objectId'>\n        /// </param>\n        /// <param name='objectType'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<SeoInfo>>> GetSeoDuplicatesWithHttpMessagesAsync(string objectId = default(string), string objectType = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Find all SEO records for object by slug\n        /// </summary>\n        /// <param name='slug'>\n        /// slug\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<IList<SeoInfo>>> GetSeoInfoBySlugWithHttpMessagesAsync(string slug, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Return all currencies registered in the system\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Currency>>> GetAllCurrenciesWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Create a existing currency\n        /// </summary>\n        /// <param name='body'>\n        /// currency\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> CreateCurrencyWithHttpMessagesAsync(Currency body = default(Currency), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Update a existing currency\n        /// </summary>\n        /// <param name='body'>\n        /// currency\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> UpdateCurrencyWithHttpMessagesAsync(Currency body = default(Currency), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Delete currencies\n        /// </summary>\n        /// <param name='codes'>\n        /// currency codes\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeleteCurrenciesWithHttpMessagesAsync(IList<string> codes = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Return all package types registered in the system\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<PackageType>>> GetAllPackageTypesWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Update a existing package type\n        /// </summary>\n        /// <param name='body'>\n        /// package type\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> UpdatePackageTypeWithHttpMessagesAsync(PackageType body = default(PackageType), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Create new package type\n        /// </summary>\n        /// <param name='body'>\n        /// package type\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> CreatePackageTypeWithHttpMessagesAsync(PackageType body = default(PackageType), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Delete package types\n        /// </summary>\n        /// <param name='ids'>\n        /// package type ids\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeletePackageTypesWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Validate address (reserved for future) and also required for expose\n        /// Address in OpenAPI swagger docs\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<bool?>> ValidateAddressWithHttpMessagesAsync(Address body = default(Address), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for Commerce.\n    /// </summary>\n    public static partial class CommerceExtensions\n    {\n            /// <summary>\n            /// Batch create or update seo infos\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void BatchUpdateSeoInfos(this ICommerce operations, IList<SeoInfo> body = default(IList<SeoInfo>))\n            {\n                operations.BatchUpdateSeoInfosAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Batch create or update seo infos\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task BatchUpdateSeoInfosAsync(this ICommerce operations, IList<SeoInfo> body = default(IList<SeoInfo>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.BatchUpdateSeoInfosWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='objectId'>\n            /// </param>\n            /// <param name='objectType'>\n            /// </param>\n            public static IList<SeoInfo> GetSeoDuplicates(this ICommerce operations, string objectId = default(string), string objectType = default(string))\n            {\n                return operations.GetSeoDuplicatesAsync(objectId, objectType).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='objectId'>\n            /// </param>\n            /// <param name='objectType'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<SeoInfo>> GetSeoDuplicatesAsync(this ICommerce operations, string objectId = default(string), string objectType = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetSeoDuplicatesWithHttpMessagesAsync(objectId, objectType, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Find all SEO records for object by slug\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='slug'>\n            /// slug\n            /// </param>\n            public static IList<SeoInfo> GetSeoInfoBySlug(this ICommerce operations, string slug)\n            {\n                return operations.GetSeoInfoBySlugAsync(slug).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Find all SEO records for object by slug\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='slug'>\n            /// slug\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<SeoInfo>> GetSeoInfoBySlugAsync(this ICommerce operations, string slug, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetSeoInfoBySlugWithHttpMessagesAsync(slug, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Return all currencies registered in the system\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static IList<Currency> GetAllCurrencies(this ICommerce operations)\n            {\n                return operations.GetAllCurrenciesAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Return all currencies registered in the system\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Currency>> GetAllCurrenciesAsync(this ICommerce operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetAllCurrenciesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Create a existing currency\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// currency\n            /// </param>\n            public static void CreateCurrency(this ICommerce operations, Currency body = default(Currency))\n            {\n                operations.CreateCurrencyAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Create a existing currency\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// currency\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task CreateCurrencyAsync(this ICommerce operations, Currency body = default(Currency), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.CreateCurrencyWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Update a existing currency\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// currency\n            /// </param>\n            public static void UpdateCurrency(this ICommerce operations, Currency body = default(Currency))\n            {\n                operations.UpdateCurrencyAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Update a existing currency\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// currency\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UpdateCurrencyAsync(this ICommerce operations, Currency body = default(Currency), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UpdateCurrencyWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Delete currencies\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='codes'>\n            /// currency codes\n            /// </param>\n            public static void DeleteCurrencies(this ICommerce operations, IList<string> codes = default(IList<string>))\n            {\n                operations.DeleteCurrenciesAsync(codes).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Delete currencies\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='codes'>\n            /// currency codes\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteCurrenciesAsync(this ICommerce operations, IList<string> codes = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteCurrenciesWithHttpMessagesAsync(codes, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Return all package types registered in the system\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static IList<PackageType> GetAllPackageTypes(this ICommerce operations)\n            {\n                return operations.GetAllPackageTypesAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Return all package types registered in the system\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<PackageType>> GetAllPackageTypesAsync(this ICommerce operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetAllPackageTypesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Update a existing package type\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// package type\n            /// </param>\n            public static void UpdatePackageType(this ICommerce operations, PackageType body = default(PackageType))\n            {\n                operations.UpdatePackageTypeAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Update a existing package type\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// package type\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UpdatePackageTypeAsync(this ICommerce operations, PackageType body = default(PackageType), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UpdatePackageTypeWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Create new package type\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// package type\n            /// </param>\n            public static void CreatePackageType(this ICommerce operations, PackageType body = default(PackageType))\n            {\n                operations.CreatePackageTypeAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Create new package type\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// package type\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task CreatePackageTypeAsync(this ICommerce operations, PackageType body = default(PackageType), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.CreatePackageTypeWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Delete package types\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// package type ids\n            /// </param>\n            public static void DeletePackageTypes(this ICommerce operations, IList<string> ids = default(IList<string>))\n            {\n                operations.DeletePackageTypesAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Delete package types\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// package type ids\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeletePackageTypesAsync(this ICommerce operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeletePackageTypesWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Validate address (reserved for future) and also required for expose Address\n            /// in OpenAPI swagger docs\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static bool? ValidateAddress(this ICommerce operations, Address body = default(Address))\n            {\n                return operations.ValidateAddressAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Validate address (reserved for future) and also required for expose Address\n            /// in OpenAPI swagger docs\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<bool?> ValidateAddressAsync(this ICommerce operations, Address body = default(Address), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.ValidateAddressWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SeoInfo\n    {\n        /// <summary>\n        /// Initializes a new instance of the SeoInfo class.\n        /// </summary>\n        public SeoInfo()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SeoInfo class.\n        /// </summary>\n        /// <param name=\"semanticUrl\">Slug</param>\n        /// <param name=\"pageTitle\">head title tag content</param>\n        /// <param name=\"metaDescription\">&lt;meta name=\"description\"\n        /// /&gt;</param>\n        /// <param name=\"metaKeywords\">&lt;meta name=\"keywords\" /&gt;</param>\n        /// <param name=\"storeId\">Tenant StoreId which SEO defined</param>\n        /// <param name=\"objectId\">SEO related object id</param>\n        /// <param name=\"objectType\">SEO related object type name</param>\n        /// <param name=\"isActive\">Active/Inactive</param>\n        public SeoInfo(string name = default(string), string semanticUrl = default(string), string pageTitle = default(string), string metaDescription = default(string), string imageAltDescription = default(string), string metaKeywords = default(string), string storeId = default(string), string objectId = default(string), string objectType = default(string), bool? isActive = default(bool?), string languageCode = default(string), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Name = name;\n            SemanticUrl = semanticUrl;\n            PageTitle = pageTitle;\n            MetaDescription = metaDescription;\n            ImageAltDescription = imageAltDescription;\n            MetaKeywords = metaKeywords;\n            StoreId = storeId;\n            ObjectId = objectId;\n            ObjectType = objectType;\n            IsActive = isActive;\n            LanguageCode = languageCode;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Gets or sets slug\n        /// </summary>\n        [JsonProperty(PropertyName = \"semanticUrl\")]\n        public string SemanticUrl { get; set; }\n\n        /// <summary>\n        /// Gets or sets head title tag content\n        /// </summary>\n        [JsonProperty(PropertyName = \"pageTitle\")]\n        public string PageTitle { get; set; }\n\n        /// <summary>\n        /// Gets or sets &amp;lt;meta name=\"description\" /&amp;gt;\n        /// </summary>\n        [JsonProperty(PropertyName = \"metaDescription\")]\n        public string MetaDescription { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"imageAltDescription\")]\n        public string ImageAltDescription { get; set; }\n\n        /// <summary>\n        /// Gets or sets &amp;lt;meta name=\"keywords\" /&amp;gt;\n        /// </summary>\n        [JsonProperty(PropertyName = \"metaKeywords\")]\n        public string MetaKeywords { get; set; }\n\n        /// <summary>\n        /// Gets or sets tenant StoreId which SEO defined\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeId\")]\n        public string StoreId { get; set; }\n\n        /// <summary>\n        /// Gets or sets SEO related object id\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// Gets or sets SEO related object type name\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// Gets or sets active/Inactive\n        /// </summary>\n        [JsonProperty(PropertyName = \"isActive\")]\n        public bool? IsActive { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class NumberFormatInfo\n    {\n        /// <summary>\n        /// Initializes a new instance of the NumberFormatInfo class.\n        /// </summary>\n        public NumberFormatInfo()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NumberFormatInfo class.\n        /// </summary>\n        /// <param name=\"digitSubstitution\">Possible values include: 'Context',\n        /// 'None', 'NativeNational'</param>\n        public NumberFormatInfo(int? currencyDecimalDigits = default(int?), string currencyDecimalSeparator = default(string), bool? isReadOnly = default(bool?), IList<int?> currencyGroupSizes = default(IList<int?>), IList<int?> numberGroupSizes = default(IList<int?>), IList<int?> percentGroupSizes = default(IList<int?>), string currencyGroupSeparator = default(string), string currencySymbol = default(string), string naNSymbol = default(string), int? currencyNegativePattern = default(int?), int? numberNegativePattern = default(int?), int? percentPositivePattern = default(int?), int? percentNegativePattern = default(int?), string negativeInfinitySymbol = default(string), string negativeSign = default(string), int? numberDecimalDigits = default(int?), string numberDecimalSeparator = default(string), string numberGroupSeparator = default(string), int? currencyPositivePattern = default(int?), string positiveInfinitySymbol = default(string), string positiveSign = default(string), int? percentDecimalDigits = default(int?), string percentDecimalSeparator = default(string), string percentGroupSeparator = default(string), string percentSymbol = default(string), string perMilleSymbol = default(string), IList<string> nativeDigits = default(IList<string>), string digitSubstitution = default(string))\n        {\n            CurrencyDecimalDigits = currencyDecimalDigits;\n            CurrencyDecimalSeparator = currencyDecimalSeparator;\n            IsReadOnly = isReadOnly;\n            CurrencyGroupSizes = currencyGroupSizes;\n            NumberGroupSizes = numberGroupSizes;\n            PercentGroupSizes = percentGroupSizes;\n            CurrencyGroupSeparator = currencyGroupSeparator;\n            CurrencySymbol = currencySymbol;\n            NaNSymbol = naNSymbol;\n            CurrencyNegativePattern = currencyNegativePattern;\n            NumberNegativePattern = numberNegativePattern;\n            PercentPositivePattern = percentPositivePattern;\n            PercentNegativePattern = percentNegativePattern;\n            NegativeInfinitySymbol = negativeInfinitySymbol;\n            NegativeSign = negativeSign;\n            NumberDecimalDigits = numberDecimalDigits;\n            NumberDecimalSeparator = numberDecimalSeparator;\n            NumberGroupSeparator = numberGroupSeparator;\n            CurrencyPositivePattern = currencyPositivePattern;\n            PositiveInfinitySymbol = positiveInfinitySymbol;\n            PositiveSign = positiveSign;\n            PercentDecimalDigits = percentDecimalDigits;\n            PercentDecimalSeparator = percentDecimalSeparator;\n            PercentGroupSeparator = percentGroupSeparator;\n            PercentSymbol = percentSymbol;\n            PerMilleSymbol = perMilleSymbol;\n            NativeDigits = nativeDigits;\n            DigitSubstitution = digitSubstitution;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"currencyDecimalDigits\")]\n        public int? CurrencyDecimalDigits { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"currencyDecimalSeparator\")]\n        public string CurrencyDecimalSeparator { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isReadOnly\")]\n        public bool? IsReadOnly { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"currencyGroupSizes\")]\n        public IList<int?> CurrencyGroupSizes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"numberGroupSizes\")]\n        public IList<int?> NumberGroupSizes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"percentGroupSizes\")]\n        public IList<int?> PercentGroupSizes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"currencyGroupSeparator\")]\n        public string CurrencyGroupSeparator { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"currencySymbol\")]\n        public string CurrencySymbol { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"naNSymbol\")]\n        public string NaNSymbol { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"currencyNegativePattern\")]\n        public int? CurrencyNegativePattern { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"numberNegativePattern\")]\n        public int? NumberNegativePattern { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"percentPositivePattern\")]\n        public int? PercentPositivePattern { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"percentNegativePattern\")]\n        public int? PercentNegativePattern { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"negativeInfinitySymbol\")]\n        public string NegativeInfinitySymbol { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"negativeSign\")]\n        public string NegativeSign { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"numberDecimalDigits\")]\n        public int? NumberDecimalDigits { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"numberDecimalSeparator\")]\n        public string NumberDecimalSeparator { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"numberGroupSeparator\")]\n        public string NumberGroupSeparator { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"currencyPositivePattern\")]\n        public int? CurrencyPositivePattern { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"positiveInfinitySymbol\")]\n        public string PositiveInfinitySymbol { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"positiveSign\")]\n        public string PositiveSign { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"percentDecimalDigits\")]\n        public int? PercentDecimalDigits { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"percentDecimalSeparator\")]\n        public string PercentDecimalSeparator { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"percentGroupSeparator\")]\n        public string PercentGroupSeparator { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"percentSymbol\")]\n        public string PercentSymbol { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"perMilleSymbol\")]\n        public string PerMilleSymbol { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"nativeDigits\")]\n        public IList<string> NativeDigits { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Context', 'None',\n        /// 'NativeNational'\n        /// </summary>\n        [JsonProperty(PropertyName = \"digitSubstitution\")]\n        public string DigitSubstitution { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Currency\n    /// </summary>\n    public partial class Currency\n    {\n        /// <summary>\n        /// Initializes a new instance of the Currency class.\n        /// </summary>\n        public Currency()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Currency class.\n        /// </summary>\n        /// <param name=\"code\">Currency code may be used ISO 4217.</param>\n        /// <param name=\"name\">name of the currency</param>\n        /// <param name=\"isPrimary\">Flag specifies that this is the primary\n        /// currency</param>\n        /// <param name=\"exchangeRate\">The exchange rate against the primary\n        /// exchange rate of the currency.</param>\n        /// <param name=\"symbol\">Currency symbol</param>\n        /// <param name=\"customFormatting\">Custom formatting pattern</param>\n        public Currency(string code = default(string), string cultureName = default(string), string englishName = default(string), NumberFormatInfo numberFormat = default(NumberFormatInfo), string name = default(string), bool? isPrimary = default(bool?), double? exchangeRate = default(double?), string symbol = default(string), string customFormatting = default(string))\n        {\n            Code = code;\n            CultureName = cultureName;\n            EnglishName = englishName;\n            NumberFormat = numberFormat;\n            Name = name;\n            IsPrimary = isPrimary;\n            ExchangeRate = exchangeRate;\n            Symbol = symbol;\n            CustomFormatting = customFormatting;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets currency code may be used ISO 4217.\n        /// </summary>\n        [JsonProperty(PropertyName = \"code\")]\n        public string Code { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"cultureName\")]\n        public string CultureName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"englishName\")]\n        public string EnglishName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"numberFormat\")]\n        public NumberFormatInfo NumberFormat { get; set; }\n\n        /// <summary>\n        /// Gets or sets name of the currency\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Gets or sets flag specifies that this is the primary currency\n        /// </summary>\n        [JsonProperty(PropertyName = \"isPrimary\")]\n        public bool? IsPrimary { get; set; }\n\n        /// <summary>\n        /// Gets or sets the exchange rate against the primary exchange rate of\n        /// the currency.\n        /// </summary>\n        [JsonProperty(PropertyName = \"exchangeRate\")]\n        public double? ExchangeRate { get; set; }\n\n        /// <summary>\n        /// Gets or sets currency symbol\n        /// </summary>\n        [JsonProperty(PropertyName = \"symbol\")]\n        public string Symbol { get; set; }\n\n        /// <summary>\n        /// Gets or sets custom formatting pattern\n        /// </summary>\n        [JsonProperty(PropertyName = \"customFormatting\")]\n        public string CustomFormatting { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Represent predefined dimensions package type\n    /// </summary>\n    public partial class PackageType\n    {\n        /// <summary>\n        /// Initializes a new instance of the PackageType class.\n        /// </summary>\n        public PackageType()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PackageType class.\n        /// </summary>\n        /// <param name=\"name\">Package type name</param>\n        public PackageType(string name = default(string), double? length = default(double?), double? width = default(double?), double? height = default(double?), string measureUnit = default(string), string id = default(string))\n        {\n            Name = name;\n            Length = length;\n            Width = width;\n            Height = height;\n            MeasureUnit = measureUnit;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets package type name\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"length\")]\n        public double? Length { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"width\")]\n        public double? Width { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"height\")]\n        public double? Height { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"measureUnit\")]\n        public string MeasureUnit { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Address\n    {\n        /// <summary>\n        /// Initializes a new instance of the Address class.\n        /// </summary>\n        public Address()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Address class.\n        /// </summary>\n        /// <param name=\"addressType\">Possible values include: 'Billing',\n        /// 'Shipping', 'BillingAndShipping', 'Pickup'</param>\n        public Address(string addressType = default(string), string key = default(string), string name = default(string), string organization = default(string), string countryCode = default(string), string countryName = default(string), string city = default(string), string postalCode = default(string), string zip = default(string), string line1 = default(string), string line2 = default(string), string regionId = default(string), string regionName = default(string), string firstName = default(string), string middleName = default(string), string lastName = default(string), string phone = default(string), string email = default(string))\n        {\n            AddressType = addressType;\n            Key = key;\n            Name = name;\n            Organization = organization;\n            CountryCode = countryCode;\n            CountryName = countryName;\n            City = city;\n            PostalCode = postalCode;\n            Zip = zip;\n            Line1 = line1;\n            Line2 = line2;\n            RegionId = regionId;\n            RegionName = regionName;\n            FirstName = firstName;\n            MiddleName = middleName;\n            LastName = lastName;\n            Phone = phone;\n            Email = email;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Billing', 'Shipping',\n        /// 'BillingAndShipping', 'Pickup'\n        /// </summary>\n        [JsonProperty(PropertyName = \"addressType\")]\n        public string AddressType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"key\")]\n        public string Key { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"organization\")]\n        public string Organization { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"countryCode\")]\n        public string CountryCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"countryName\")]\n        public string CountryName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"city\")]\n        public string City { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"postalCode\")]\n        public string PostalCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"zip\")]\n        public string Zip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"line1\")]\n        public string Line1 { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"line2\")]\n        public string Line2 { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"regionId\")]\n        public string RegionId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"regionName\")]\n        public string RegionName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"firstName\")]\n        public string FirstName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"middleName\")]\n        public string MiddleName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"lastName\")]\n        public string LastName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"phone\")]\n        public string Phone { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"email\")]\n        public string Email { get; set; }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/AutoRestClients/CustomerModuleApi.cs",
    "content": "// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class CustomerModuleClient : ServiceClient<CustomerModuleClient>, ICustomerModuleClient\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        public System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        public JsonSerializerSettings SerializationSettings { get; private set; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        public JsonSerializerSettings DeserializationSettings { get; private set; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client subscription.\n        /// </summary>\n        public ServiceClientCredentials Credentials { get; private set; }\n\n        /// <summary>\n        /// Gets the ICustomerModule.\n        /// </summary>\n        public virtual ICustomerModule CustomerModule { get; private set; }\n\n        /// <summary>\n        /// Initializes a new instance of the CustomerModuleClient class.\n        /// </summary>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling CustomerModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        protected CustomerModuleClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CustomerModuleClient class.\n        /// </summary>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected CustomerModuleClient(params DelegatingHandler[] handlers) : base(handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CustomerModuleClient class.\n        /// </summary>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected CustomerModuleClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CustomerModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected CustomerModuleClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CustomerModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected CustomerModuleClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CustomerModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CustomerModuleClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CustomerModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling CustomerModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CustomerModuleClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CustomerModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CustomerModuleClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CustomerModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CustomerModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CustomerModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CustomerModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// An optional partial-method to perform custom initialization.\n        ///</summary>\n        partial void CustomInitialize();\n        /// <summary>\n        /// Initializes client properties.\n        /// </summary>\n        private void Initialize()\n        {\n            CustomerModule = new CustomerModule(this);\n            BaseUri = new System.Uri(\"http://localhost\");\n            SerializationSettings = new JsonSerializerSettings\n            {\n                Formatting = Newtonsoft.Json.Formatting.Indented,\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new  List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            DeserializationSettings = new JsonSerializerSettings\n            {\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            CustomInitialize();\n        }\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// </summary>\n    public partial interface ICustomerModuleClient : System.IDisposable\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        JsonSerializerSettings SerializationSettings { get; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        JsonSerializerSettings DeserializationSettings { get; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client\n        /// subscription.\n        /// </summary>\n        ServiceClientCredentials Credentials { get; }\n\n\n        /// <summary>\n        /// Gets the ICustomerModule.\n        /// </summary>\n        ICustomerModule CustomerModule { get; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CustomerModule operations.\n    /// </summary>\n    public partial class CustomerModule : IServiceOperations<CustomerModuleClient>, ICustomerModule\n    {\n        /// <summary>\n        /// Initializes a new instance of the CustomerModule class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public CustomerModule(CustomerModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the CustomerModuleClient\n        /// </summary>\n        public CustomerModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Get organizations\n        /// </summary>\n        /// <remarks>\n        /// Get array of all organizations.\n        /// </remarks>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Organization>>> ListOrganizationsWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ListOrganizations\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/members/organizations\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Organization>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Organization>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get members\n        /// </summary>\n        /// <remarks>\n        /// Get array of members satisfied search criteria.\n        /// </remarks>\n        /// <param name='body'>\n        /// concrete instance of SearchCriteria type type will be created by using\n        /// PolymorphicMemberSearchCriteriaJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<MemberSearchResult>> SearchMemberWithHttpMessagesAsync(MembersSearchCriteria body = default(MembersSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchMember\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/members/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<MemberSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<MemberSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get member\n        /// </summary>\n        /// <param name='id'>\n        /// member id\n        /// </param>\n        /// <param name='responseGroup'>\n        /// response group\n        /// </param>\n        /// <param name='memberType'>\n        /// member type\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Member>> GetMemberByIdWithHttpMessagesAsync(string id, string responseGroup = default(string), string memberType = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"responseGroup\", responseGroup);\n                tracingParameters.Add(\"memberType\", memberType);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetMemberById\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/members/{id}\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            List<string> _queryParameters = new List<string>();\n            if (responseGroup != null)\n            {\n                _queryParameters.Add(string.Format(\"responseGroup={0}\", System.Uri.EscapeDataString(responseGroup)));\n            }\n            if (memberType != null)\n            {\n                _queryParameters.Add(string.Format(\"memberType={0}\", System.Uri.EscapeDataString(memberType)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Member>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Member>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='ids'>\n        /// </param>\n        /// <param name='responseGroup'>\n        /// </param>\n        /// <param name='memberTypes'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Member>>> GetMembersByIdsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), string responseGroup = default(string), IList<string> memberTypes = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"responseGroup\", responseGroup);\n                tracingParameters.Add(\"memberTypes\", memberTypes);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetMembersByIds\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/members\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                if (ids.Count == 0)\n                {\n                    _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Empty)));\n                }\n                else\n                {\n                    foreach (var _item in ids)\n                    {\n                        _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(\"\" + _item)));\n                    }\n                }\n            }\n            if (responseGroup != null)\n            {\n                _queryParameters.Add(string.Format(\"responseGroup={0}\", System.Uri.EscapeDataString(responseGroup)));\n            }\n            if (memberTypes != null)\n            {\n                if (memberTypes.Count == 0)\n                {\n                    _queryParameters.Add(string.Format(\"memberTypes={0}\", System.Uri.EscapeDataString(string.Empty)));\n                }\n                else\n                {\n                    foreach (var _item in memberTypes)\n                    {\n                        _queryParameters.Add(string.Format(\"memberTypes={0}\", System.Uri.EscapeDataString(\"\" + _item)));\n                    }\n                }\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Member>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Member>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Create new member (can be any object inherited from Member type)\n        /// </summary>\n        /// <param name='body'>\n        /// concrete instance of abstract member type will be created by using\n        /// PolymorphicMemberJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Member>> CreateMemberWithHttpMessagesAsync(Member body = default(Member), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CreateMember\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/members\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Member>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Member>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Update member\n        /// </summary>\n        /// <param name='body'>\n        /// concrete instance of abstract member type will be created by using\n        /// PolymorphicMemberJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UpdateMemberWithHttpMessagesAsync(Member body = default(Member), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdateMember\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/members\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Delete members\n        /// </summary>\n        /// <remarks>\n        /// Delete members by given array of ids.\n        /// </remarks>\n        /// <param name='ids'>\n        /// An array of members ids\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteMembersWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteMembers\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/members\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Join(\",\", ids))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Bulk create new members (can be any objects inherited from Member type)\n        /// </summary>\n        /// <param name='body'>\n        /// Array of concrete instances of abstract member type will be created by\n        /// using PolymorphicMemberJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Member>>> BulkCreateMembersWithHttpMessagesAsync(IList<Member> body = default(IList<Member>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"BulkCreateMembers\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/members/bulk\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Member>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Member>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Bulk update members\n        /// </summary>\n        /// <param name='body'>\n        /// Array of concrete instances of abstract member type will be created by\n        /// using PolymorphicMemberJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> BulkUpdateMembersWithHttpMessagesAsync(IList<Member> body = default(IList<Member>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"BulkUpdateMembers\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/members/bulk\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Bulk delete members\n        /// </summary>\n        /// <remarks>\n        /// Bulk delete members by search criteria of members.\n        /// </remarks>\n        /// <param name='body'>\n        /// concrete instance of SearchCriteria type will be created by using\n        /// PolymorphicMemberSearchCriteriaJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> BulkDeleteMembersBySearchCriteriaWithHttpMessagesAsync(MembersSearchCriteria body = default(MembersSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"BulkDeleteMembersBySearchCriteria\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/members/delete\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> ResizeIconWithHttpMessagesAsync(IconResizeRequest body = default(IconResizeRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ResizeIcon\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/member/icon/resize\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Create contact\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Contact>> CreateContactWithHttpMessagesAsync(Contact body = default(Contact), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CreateContact\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/contacts\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Contact>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Contact>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Update contact\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UpdateContactWithHttpMessagesAsync(Contact body = default(Contact), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdateContact\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/contacts\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Delete contacts\n        /// </summary>\n        /// <remarks>\n        /// Delete contacts by given array of ids.\n        /// </remarks>\n        /// <param name='ids'>\n        /// An array of contacts ids\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteContactsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteContacts\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/contacts\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Join(\",\", ids))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get plenty contacts\n        /// </summary>\n        /// <param name='ids'>\n        /// contact IDs\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Contact>>> GetContactsByIdsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetContactsByIds\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/contacts\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                if (ids.Count == 0)\n                {\n                    _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Empty)));\n                }\n                else\n                {\n                    foreach (var _item in ids)\n                    {\n                        _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(\"\" + _item)));\n                    }\n                }\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Contact>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Contact>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Bulk create contacts\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Contact>>> BulkCreateContactsWithHttpMessagesAsync(IList<Contact> body = default(IList<Contact>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"BulkCreateContacts\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/contacts/bulk\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Contact>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Contact>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Bulk update contact\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> BulkUpdateContactsWithHttpMessagesAsync(IList<Contact> body = default(IList<Contact>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"BulkUpdateContacts\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/contacts/bulk\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Create organization\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Organization>> CreateOrganizationWithHttpMessagesAsync(Organization body = default(Organization), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CreateOrganization\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/organizations\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Organization>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Organization>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Update organization\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UpdateOrganizationWithHttpMessagesAsync(Organization body = default(Organization), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdateOrganization\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/organizations\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Delete organizations\n        /// </summary>\n        /// <remarks>\n        /// Delete organizations by given array of ids.\n        /// </remarks>\n        /// <param name='ids'>\n        /// An array of organizations ids\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteOrganizationsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteOrganizations\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/organizations\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Join(\",\", ids))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get plenty organizations\n        /// </summary>\n        /// <param name='ids'>\n        /// Organization ids\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Organization>>> GetOrganizationsByIdsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetOrganizationsByIds\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/organizations\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                if (ids.Count == 0)\n                {\n                    _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Empty)));\n                }\n                else\n                {\n                    foreach (var _item in ids)\n                    {\n                        _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(\"\" + _item)));\n                    }\n                }\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Organization>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Organization>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Bulk create organizations\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> BulkCreateOrganizationsWithHttpMessagesAsync(IList<Organization> body = default(IList<Organization>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"BulkCreateOrganizations\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/organizations/bulk\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Bulk update organization\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> BulkUpdateOrganizationsWithHttpMessagesAsync(IList<Organization> body = default(IList<Organization>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"BulkUpdateOrganizations\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/organizations/bulk\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get organization\n        /// </summary>\n        /// <param name='id'>\n        /// Organization id\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Organization>> GetOrganizationByIdWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetOrganizationById\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/organizations/{id}\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Organization>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Organization>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Search organizations\n        /// </summary>\n        /// <remarks>\n        /// Get array of organizations satisfied search criteria.\n        /// </remarks>\n        /// <param name='body'>\n        /// concrete instance of SearchCriteria type type will be created by using\n        /// PolymorphicMemberSearchCriteriaJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<OrganizationSearchResult>> SearchOrganizationsWithHttpMessagesAsync(MembersSearchCriteria body = default(MembersSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchOrganizations\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/organizations/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<OrganizationSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<OrganizationSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get contact\n        /// </summary>\n        /// <param name='id'>\n        /// Contact ID\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Contact>> GetContactByIdWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetContactById\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/contacts/{id}\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Contact>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Contact>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Search contacts\n        /// </summary>\n        /// <remarks>\n        /// Get array of contacts satisfied search criteria.\n        /// </remarks>\n        /// <param name='body'>\n        /// concrete instance of SearchCriteria type type will be created by using\n        /// PolymorphicMemberSearchCriteriaJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ContactSearchResult>> SearchContactsWithHttpMessagesAsync(MembersSearchCriteria body = default(MembersSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchContacts\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/contacts/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ContactSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ContactSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get vendor\n        /// </summary>\n        /// <param name='id'>\n        /// Vendor ID\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Vendor>> GetVendorByIdWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetVendorById\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/vendors/{id}\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Vendor>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Vendor>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get plenty vendors\n        /// </summary>\n        /// <param name='ids'>\n        /// Vendors IDs\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Vendor>>> GetVendorsByIdsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetVendorsByIds\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/vendors\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                if (ids.Count == 0)\n                {\n                    _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Empty)));\n                }\n                else\n                {\n                    foreach (var _item in ids)\n                    {\n                        _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(\"\" + _item)));\n                    }\n                }\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Vendor>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Vendor>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Search vendors\n        /// </summary>\n        /// <remarks>\n        /// Get array of vendors satisfied search criteria.\n        /// </remarks>\n        /// <param name='body'>\n        /// concrete instance of SearchCriteria type type will be created by using\n        /// PolymorphicMemberSearchCriteriaJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<VendorSearchResult>> SearchVendorsWithHttpMessagesAsync(MembersSearchCriteria body = default(MembersSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchVendors\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/vendors/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<VendorSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<VendorSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='memberId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UpdateAddessesWithHttpMessagesAsync(IList<CustomerAddress> body = default(IList<CustomerAddress>), string memberId = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"memberId\", memberId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdateAddesses\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/addresses\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (memberId != null)\n            {\n                _queryParameters.Add(string.Format(\"memberId={0}\", System.Uri.EscapeDataString(memberId)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Create employee\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Employee>> CreateEmployeeWithHttpMessagesAsync(Employee body = default(Employee), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CreateEmployee\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/employees\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Employee>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Employee>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get plenty employees\n        /// </summary>\n        /// <param name='ids'>\n        /// contact IDs\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Employee>>> GetEmployeesByIdsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetEmployeesByIds\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/employees\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                if (ids.Count == 0)\n                {\n                    _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Empty)));\n                }\n                else\n                {\n                    foreach (var _item in ids)\n                    {\n                        _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(\"\" + _item)));\n                    }\n                }\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Employee>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Employee>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Create employee\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Employee>>> BulkCreateEmployeesWithHttpMessagesAsync(IList<Employee> body = default(IList<Employee>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"BulkCreateEmployees\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/employees/bulk\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Employee>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Employee>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get all member organizations\n        /// </summary>\n        /// <param name='id'>\n        /// member Id\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Organization>>> GetMemberOrganizationsWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetMemberOrganizations\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/members/{id}/organizations\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Organization>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Organization>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// CustomerModule operations.\n    /// </summary>\n    public partial interface ICustomerModule\n    {\n        /// <summary>\n        /// Get organizations\n        /// </summary>\n        /// <remarks>\n        /// Get array of all organizations.\n        /// </remarks>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Organization>>> ListOrganizationsWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get members\n        /// </summary>\n        /// <remarks>\n        /// Get array of members satisfied search criteria.\n        /// </remarks>\n        /// <param name='body'>\n        /// concrete instance of SearchCriteria type type will be created by\n        /// using PolymorphicMemberSearchCriteriaJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<MemberSearchResult>> SearchMemberWithHttpMessagesAsync(MembersSearchCriteria body = default(MembersSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get member\n        /// </summary>\n        /// <param name='id'>\n        /// member id\n        /// </param>\n        /// <param name='responseGroup'>\n        /// response group\n        /// </param>\n        /// <param name='memberType'>\n        /// member type\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Member>> GetMemberByIdWithHttpMessagesAsync(string id, string responseGroup = default(string), string memberType = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='ids'>\n        /// </param>\n        /// <param name='responseGroup'>\n        /// </param>\n        /// <param name='memberTypes'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Member>>> GetMembersByIdsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), string responseGroup = default(string), IList<string> memberTypes = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Create new member (can be any object inherited from Member type)\n        /// </summary>\n        /// <param name='body'>\n        /// concrete instance of abstract member type will be created by using\n        /// PolymorphicMemberJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<Member>> CreateMemberWithHttpMessagesAsync(Member body = default(Member), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Update member\n        /// </summary>\n        /// <param name='body'>\n        /// concrete instance of abstract member type will be created by using\n        /// PolymorphicMemberJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> UpdateMemberWithHttpMessagesAsync(Member body = default(Member), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Delete members\n        /// </summary>\n        /// <remarks>\n        /// Delete members by given array of ids.\n        /// </remarks>\n        /// <param name='ids'>\n        /// An array of members ids\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeleteMembersWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Bulk create new members (can be any objects inherited from Member\n        /// type)\n        /// </summary>\n        /// <param name='body'>\n        /// Array of concrete instances of abstract member type will be created\n        /// by using PolymorphicMemberJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Member>>> BulkCreateMembersWithHttpMessagesAsync(IList<Member> body = default(IList<Member>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Bulk update members\n        /// </summary>\n        /// <param name='body'>\n        /// Array of concrete instances of abstract member type will be created\n        /// by using PolymorphicMemberJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> BulkUpdateMembersWithHttpMessagesAsync(IList<Member> body = default(IList<Member>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Bulk delete members\n        /// </summary>\n        /// <remarks>\n        /// Bulk delete members by search criteria of members.\n        /// </remarks>\n        /// <param name='body'>\n        /// concrete instance of SearchCriteria type will be created by using\n        /// PolymorphicMemberSearchCriteriaJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> BulkDeleteMembersBySearchCriteriaWithHttpMessagesAsync(MembersSearchCriteria body = default(MembersSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> ResizeIconWithHttpMessagesAsync(IconResizeRequest body = default(IconResizeRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Create contact\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<Contact>> CreateContactWithHttpMessagesAsync(Contact body = default(Contact), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Update contact\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> UpdateContactWithHttpMessagesAsync(Contact body = default(Contact), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Delete contacts\n        /// </summary>\n        /// <remarks>\n        /// Delete contacts by given array of ids.\n        /// </remarks>\n        /// <param name='ids'>\n        /// An array of contacts ids\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeleteContactsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get plenty contacts\n        /// </summary>\n        /// <param name='ids'>\n        /// contact IDs\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Contact>>> GetContactsByIdsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Bulk create contacts\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Contact>>> BulkCreateContactsWithHttpMessagesAsync(IList<Contact> body = default(IList<Contact>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Bulk update contact\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> BulkUpdateContactsWithHttpMessagesAsync(IList<Contact> body = default(IList<Contact>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Create organization\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<Organization>> CreateOrganizationWithHttpMessagesAsync(Organization body = default(Organization), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Update organization\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> UpdateOrganizationWithHttpMessagesAsync(Organization body = default(Organization), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Delete organizations\n        /// </summary>\n        /// <remarks>\n        /// Delete organizations by given array of ids.\n        /// </remarks>\n        /// <param name='ids'>\n        /// An array of organizations ids\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeleteOrganizationsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get plenty organizations\n        /// </summary>\n        /// <param name='ids'>\n        /// Organization ids\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Organization>>> GetOrganizationsByIdsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Bulk create organizations\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> BulkCreateOrganizationsWithHttpMessagesAsync(IList<Organization> body = default(IList<Organization>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Bulk update organization\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> BulkUpdateOrganizationsWithHttpMessagesAsync(IList<Organization> body = default(IList<Organization>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get organization\n        /// </summary>\n        /// <param name='id'>\n        /// Organization id\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Organization>> GetOrganizationByIdWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Search organizations\n        /// </summary>\n        /// <remarks>\n        /// Get array of organizations satisfied search criteria.\n        /// </remarks>\n        /// <param name='body'>\n        /// concrete instance of SearchCriteria type type will be created by\n        /// using PolymorphicMemberSearchCriteriaJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<OrganizationSearchResult>> SearchOrganizationsWithHttpMessagesAsync(MembersSearchCriteria body = default(MembersSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get contact\n        /// </summary>\n        /// <param name='id'>\n        /// Contact ID\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Contact>> GetContactByIdWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Search contacts\n        /// </summary>\n        /// <remarks>\n        /// Get array of contacts satisfied search criteria.\n        /// </remarks>\n        /// <param name='body'>\n        /// concrete instance of SearchCriteria type type will be created by\n        /// using PolymorphicMemberSearchCriteriaJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<ContactSearchResult>> SearchContactsWithHttpMessagesAsync(MembersSearchCriteria body = default(MembersSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get vendor\n        /// </summary>\n        /// <param name='id'>\n        /// Vendor ID\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Vendor>> GetVendorByIdWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get plenty vendors\n        /// </summary>\n        /// <param name='ids'>\n        /// Vendors IDs\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Vendor>>> GetVendorsByIdsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Search vendors\n        /// </summary>\n        /// <remarks>\n        /// Get array of vendors satisfied search criteria.\n        /// </remarks>\n        /// <param name='body'>\n        /// concrete instance of SearchCriteria type type will be created by\n        /// using PolymorphicMemberSearchCriteriaJsonConverter\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<VendorSearchResult>> SearchVendorsWithHttpMessagesAsync(MembersSearchCriteria body = default(MembersSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='memberId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> UpdateAddessesWithHttpMessagesAsync(IList<CustomerAddress> body = default(IList<CustomerAddress>), string memberId = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Create employee\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<Employee>> CreateEmployeeWithHttpMessagesAsync(Employee body = default(Employee), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get plenty employees\n        /// </summary>\n        /// <param name='ids'>\n        /// contact IDs\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Employee>>> GetEmployeesByIdsWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Create employee\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Employee>>> BulkCreateEmployeesWithHttpMessagesAsync(IList<Employee> body = default(IList<Employee>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get all member organizations\n        /// </summary>\n        /// <param name='id'>\n        /// member Id\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<IList<Organization>>> GetMemberOrganizationsWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for CustomerModule.\n    /// </summary>\n    public static partial class CustomerModuleExtensions\n    {\n            /// <summary>\n            /// Get organizations\n            /// </summary>\n            /// <remarks>\n            /// Get array of all organizations.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static IList<Organization> ListOrganizations(this ICustomerModule operations)\n            {\n                return operations.ListOrganizationsAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get organizations\n            /// </summary>\n            /// <remarks>\n            /// Get array of all organizations.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Organization>> ListOrganizationsAsync(this ICustomerModule operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.ListOrganizationsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get members\n            /// </summary>\n            /// <remarks>\n            /// Get array of members satisfied search criteria.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// concrete instance of SearchCriteria type type will be created by using\n            /// PolymorphicMemberSearchCriteriaJsonConverter\n            /// </param>\n            public static MemberSearchResult SearchMember(this ICustomerModule operations, MembersSearchCriteria body = default(MembersSearchCriteria))\n            {\n                return operations.SearchMemberAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get members\n            /// </summary>\n            /// <remarks>\n            /// Get array of members satisfied search criteria.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// concrete instance of SearchCriteria type type will be created by using\n            /// PolymorphicMemberSearchCriteriaJsonConverter\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<MemberSearchResult> SearchMemberAsync(this ICustomerModule operations, MembersSearchCriteria body = default(MembersSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchMemberWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get member\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// member id\n            /// </param>\n            /// <param name='responseGroup'>\n            /// response group\n            /// </param>\n            /// <param name='memberType'>\n            /// member type\n            /// </param>\n            public static Member GetMemberById(this ICustomerModule operations, string id, string responseGroup = default(string), string memberType = default(string))\n            {\n                return operations.GetMemberByIdAsync(id, responseGroup, memberType).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get member\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// member id\n            /// </param>\n            /// <param name='responseGroup'>\n            /// response group\n            /// </param>\n            /// <param name='memberType'>\n            /// member type\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Member> GetMemberByIdAsync(this ICustomerModule operations, string id, string responseGroup = default(string), string memberType = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetMemberByIdWithHttpMessagesAsync(id, responseGroup, memberType, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// </param>\n            /// <param name='responseGroup'>\n            /// </param>\n            /// <param name='memberTypes'>\n            /// </param>\n            public static IList<Member> GetMembersByIds(this ICustomerModule operations, IList<string> ids = default(IList<string>), string responseGroup = default(string), IList<string> memberTypes = default(IList<string>))\n            {\n                return operations.GetMembersByIdsAsync(ids, responseGroup, memberTypes).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// </param>\n            /// <param name='responseGroup'>\n            /// </param>\n            /// <param name='memberTypes'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Member>> GetMembersByIdsAsync(this ICustomerModule operations, IList<string> ids = default(IList<string>), string responseGroup = default(string), IList<string> memberTypes = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetMembersByIdsWithHttpMessagesAsync(ids, responseGroup, memberTypes, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Create new member (can be any object inherited from Member type)\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// concrete instance of abstract member type will be created by using\n            /// PolymorphicMemberJsonConverter\n            /// </param>\n            public static Member CreateMember(this ICustomerModule operations, Member body = default(Member))\n            {\n                return operations.CreateMemberAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Create new member (can be any object inherited from Member type)\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// concrete instance of abstract member type will be created by using\n            /// PolymorphicMemberJsonConverter\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Member> CreateMemberAsync(this ICustomerModule operations, Member body = default(Member), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.CreateMemberWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Update member\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// concrete instance of abstract member type will be created by using\n            /// PolymorphicMemberJsonConverter\n            /// </param>\n            public static void UpdateMember(this ICustomerModule operations, Member body = default(Member))\n            {\n                operations.UpdateMemberAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Update member\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// concrete instance of abstract member type will be created by using\n            /// PolymorphicMemberJsonConverter\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UpdateMemberAsync(this ICustomerModule operations, Member body = default(Member), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UpdateMemberWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Delete members\n            /// </summary>\n            /// <remarks>\n            /// Delete members by given array of ids.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// An array of members ids\n            /// </param>\n            public static void DeleteMembers(this ICustomerModule operations, IList<string> ids = default(IList<string>))\n            {\n                operations.DeleteMembersAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Delete members\n            /// </summary>\n            /// <remarks>\n            /// Delete members by given array of ids.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// An array of members ids\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteMembersAsync(this ICustomerModule operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteMembersWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Bulk create new members (can be any objects inherited from Member type)\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Array of concrete instances of abstract member type will be created by\n            /// using PolymorphicMemberJsonConverter\n            /// </param>\n            public static IList<Member> BulkCreateMembers(this ICustomerModule operations, IList<Member> body = default(IList<Member>))\n            {\n                return operations.BulkCreateMembersAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Bulk create new members (can be any objects inherited from Member type)\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Array of concrete instances of abstract member type will be created by\n            /// using PolymorphicMemberJsonConverter\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Member>> BulkCreateMembersAsync(this ICustomerModule operations, IList<Member> body = default(IList<Member>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.BulkCreateMembersWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Bulk update members\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Array of concrete instances of abstract member type will be created by\n            /// using PolymorphicMemberJsonConverter\n            /// </param>\n            public static void BulkUpdateMembers(this ICustomerModule operations, IList<Member> body = default(IList<Member>))\n            {\n                operations.BulkUpdateMembersAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Bulk update members\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Array of concrete instances of abstract member type will be created by\n            /// using PolymorphicMemberJsonConverter\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task BulkUpdateMembersAsync(this ICustomerModule operations, IList<Member> body = default(IList<Member>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.BulkUpdateMembersWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Bulk delete members\n            /// </summary>\n            /// <remarks>\n            /// Bulk delete members by search criteria of members.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// concrete instance of SearchCriteria type will be created by using\n            /// PolymorphicMemberSearchCriteriaJsonConverter\n            /// </param>\n            public static void BulkDeleteMembersBySearchCriteria(this ICustomerModule operations, MembersSearchCriteria body = default(MembersSearchCriteria))\n            {\n                operations.BulkDeleteMembersBySearchCriteriaAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Bulk delete members\n            /// </summary>\n            /// <remarks>\n            /// Bulk delete members by search criteria of members.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// concrete instance of SearchCriteria type will be created by using\n            /// PolymorphicMemberSearchCriteriaJsonConverter\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task BulkDeleteMembersBySearchCriteriaAsync(this ICustomerModule operations, MembersSearchCriteria body = default(MembersSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.BulkDeleteMembersBySearchCriteriaWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void ResizeIcon(this ICustomerModule operations, IconResizeRequest body = default(IconResizeRequest))\n            {\n                operations.ResizeIconAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task ResizeIconAsync(this ICustomerModule operations, IconResizeRequest body = default(IconResizeRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.ResizeIconWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Create contact\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static Contact CreateContact(this ICustomerModule operations, Contact body = default(Contact))\n            {\n                return operations.CreateContactAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Create contact\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Contact> CreateContactAsync(this ICustomerModule operations, Contact body = default(Contact), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.CreateContactWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Update contact\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void UpdateContact(this ICustomerModule operations, Contact body = default(Contact))\n            {\n                operations.UpdateContactAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Update contact\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UpdateContactAsync(this ICustomerModule operations, Contact body = default(Contact), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UpdateContactWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Delete contacts\n            /// </summary>\n            /// <remarks>\n            /// Delete contacts by given array of ids.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// An array of contacts ids\n            /// </param>\n            public static void DeleteContacts(this ICustomerModule operations, IList<string> ids = default(IList<string>))\n            {\n                operations.DeleteContactsAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Delete contacts\n            /// </summary>\n            /// <remarks>\n            /// Delete contacts by given array of ids.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// An array of contacts ids\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteContactsAsync(this ICustomerModule operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteContactsWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Get plenty contacts\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// contact IDs\n            /// </param>\n            public static IList<Contact> GetContactsByIds(this ICustomerModule operations, IList<string> ids = default(IList<string>))\n            {\n                return operations.GetContactsByIdsAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get plenty contacts\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// contact IDs\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Contact>> GetContactsByIdsAsync(this ICustomerModule operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetContactsByIdsWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Bulk create contacts\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static IList<Contact> BulkCreateContacts(this ICustomerModule operations, IList<Contact> body = default(IList<Contact>))\n            {\n                return operations.BulkCreateContactsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Bulk create contacts\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Contact>> BulkCreateContactsAsync(this ICustomerModule operations, IList<Contact> body = default(IList<Contact>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.BulkCreateContactsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Bulk update contact\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void BulkUpdateContacts(this ICustomerModule operations, IList<Contact> body = default(IList<Contact>))\n            {\n                operations.BulkUpdateContactsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Bulk update contact\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task BulkUpdateContactsAsync(this ICustomerModule operations, IList<Contact> body = default(IList<Contact>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.BulkUpdateContactsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Create organization\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static Organization CreateOrganization(this ICustomerModule operations, Organization body = default(Organization))\n            {\n                return operations.CreateOrganizationAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Create organization\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Organization> CreateOrganizationAsync(this ICustomerModule operations, Organization body = default(Organization), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.CreateOrganizationWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Update organization\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void UpdateOrganization(this ICustomerModule operations, Organization body = default(Organization))\n            {\n                operations.UpdateOrganizationAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Update organization\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UpdateOrganizationAsync(this ICustomerModule operations, Organization body = default(Organization), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UpdateOrganizationWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Delete organizations\n            /// </summary>\n            /// <remarks>\n            /// Delete organizations by given array of ids.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// An array of organizations ids\n            /// </param>\n            public static void DeleteOrganizations(this ICustomerModule operations, IList<string> ids = default(IList<string>))\n            {\n                operations.DeleteOrganizationsAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Delete organizations\n            /// </summary>\n            /// <remarks>\n            /// Delete organizations by given array of ids.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// An array of organizations ids\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteOrganizationsAsync(this ICustomerModule operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteOrganizationsWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Get plenty organizations\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// Organization ids\n            /// </param>\n            public static IList<Organization> GetOrganizationsByIds(this ICustomerModule operations, IList<string> ids = default(IList<string>))\n            {\n                return operations.GetOrganizationsByIdsAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get plenty organizations\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// Organization ids\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Organization>> GetOrganizationsByIdsAsync(this ICustomerModule operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetOrganizationsByIdsWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Bulk create organizations\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void BulkCreateOrganizations(this ICustomerModule operations, IList<Organization> body = default(IList<Organization>))\n            {\n                operations.BulkCreateOrganizationsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Bulk create organizations\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task BulkCreateOrganizationsAsync(this ICustomerModule operations, IList<Organization> body = default(IList<Organization>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.BulkCreateOrganizationsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Bulk update organization\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void BulkUpdateOrganizations(this ICustomerModule operations, IList<Organization> body = default(IList<Organization>))\n            {\n                operations.BulkUpdateOrganizationsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Bulk update organization\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task BulkUpdateOrganizationsAsync(this ICustomerModule operations, IList<Organization> body = default(IList<Organization>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.BulkUpdateOrganizationsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Get organization\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Organization id\n            /// </param>\n            public static Organization GetOrganizationById(this ICustomerModule operations, string id)\n            {\n                return operations.GetOrganizationByIdAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get organization\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Organization id\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Organization> GetOrganizationByIdAsync(this ICustomerModule operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetOrganizationByIdWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Search organizations\n            /// </summary>\n            /// <remarks>\n            /// Get array of organizations satisfied search criteria.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// concrete instance of SearchCriteria type type will be created by using\n            /// PolymorphicMemberSearchCriteriaJsonConverter\n            /// </param>\n            public static OrganizationSearchResult SearchOrganizations(this ICustomerModule operations, MembersSearchCriteria body = default(MembersSearchCriteria))\n            {\n                return operations.SearchOrganizationsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Search organizations\n            /// </summary>\n            /// <remarks>\n            /// Get array of organizations satisfied search criteria.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// concrete instance of SearchCriteria type type will be created by using\n            /// PolymorphicMemberSearchCriteriaJsonConverter\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<OrganizationSearchResult> SearchOrganizationsAsync(this ICustomerModule operations, MembersSearchCriteria body = default(MembersSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchOrganizationsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get contact\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Contact ID\n            /// </param>\n            public static Contact GetContactById(this ICustomerModule operations, string id)\n            {\n                return operations.GetContactByIdAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get contact\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Contact ID\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Contact> GetContactByIdAsync(this ICustomerModule operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetContactByIdWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Search contacts\n            /// </summary>\n            /// <remarks>\n            /// Get array of contacts satisfied search criteria.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// concrete instance of SearchCriteria type type will be created by using\n            /// PolymorphicMemberSearchCriteriaJsonConverter\n            /// </param>\n            public static ContactSearchResult SearchContacts(this ICustomerModule operations, MembersSearchCriteria body = default(MembersSearchCriteria))\n            {\n                return operations.SearchContactsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Search contacts\n            /// </summary>\n            /// <remarks>\n            /// Get array of contacts satisfied search criteria.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// concrete instance of SearchCriteria type type will be created by using\n            /// PolymorphicMemberSearchCriteriaJsonConverter\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ContactSearchResult> SearchContactsAsync(this ICustomerModule operations, MembersSearchCriteria body = default(MembersSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchContactsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get vendor\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Vendor ID\n            /// </param>\n            public static Vendor GetVendorById(this ICustomerModule operations, string id)\n            {\n                return operations.GetVendorByIdAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get vendor\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Vendor ID\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Vendor> GetVendorByIdAsync(this ICustomerModule operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetVendorByIdWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get plenty vendors\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// Vendors IDs\n            /// </param>\n            public static IList<Vendor> GetVendorsByIds(this ICustomerModule operations, IList<string> ids = default(IList<string>))\n            {\n                return operations.GetVendorsByIdsAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get plenty vendors\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// Vendors IDs\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Vendor>> GetVendorsByIdsAsync(this ICustomerModule operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetVendorsByIdsWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Search vendors\n            /// </summary>\n            /// <remarks>\n            /// Get array of vendors satisfied search criteria.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// concrete instance of SearchCriteria type type will be created by using\n            /// PolymorphicMemberSearchCriteriaJsonConverter\n            /// </param>\n            public static VendorSearchResult SearchVendors(this ICustomerModule operations, MembersSearchCriteria body = default(MembersSearchCriteria))\n            {\n                return operations.SearchVendorsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Search vendors\n            /// </summary>\n            /// <remarks>\n            /// Get array of vendors satisfied search criteria.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// concrete instance of SearchCriteria type type will be created by using\n            /// PolymorphicMemberSearchCriteriaJsonConverter\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<VendorSearchResult> SearchVendorsAsync(this ICustomerModule operations, MembersSearchCriteria body = default(MembersSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchVendorsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='memberId'>\n            /// </param>\n            public static void UpdateAddesses(this ICustomerModule operations, IList<CustomerAddress> body = default(IList<CustomerAddress>), string memberId = default(string))\n            {\n                operations.UpdateAddessesAsync(body, memberId).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='memberId'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UpdateAddessesAsync(this ICustomerModule operations, IList<CustomerAddress> body = default(IList<CustomerAddress>), string memberId = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UpdateAddessesWithHttpMessagesAsync(body, memberId, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Create employee\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static Employee CreateEmployee(this ICustomerModule operations, Employee body = default(Employee))\n            {\n                return operations.CreateEmployeeAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Create employee\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Employee> CreateEmployeeAsync(this ICustomerModule operations, Employee body = default(Employee), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.CreateEmployeeWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get plenty employees\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// contact IDs\n            /// </param>\n            public static IList<Employee> GetEmployeesByIds(this ICustomerModule operations, IList<string> ids = default(IList<string>))\n            {\n                return operations.GetEmployeesByIdsAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get plenty employees\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// contact IDs\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Employee>> GetEmployeesByIdsAsync(this ICustomerModule operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetEmployeesByIdsWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Create employee\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static IList<Employee> BulkCreateEmployees(this ICustomerModule operations, IList<Employee> body = default(IList<Employee>))\n            {\n                return operations.BulkCreateEmployeesAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Create employee\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Employee>> BulkCreateEmployeesAsync(this ICustomerModule operations, IList<Employee> body = default(IList<Employee>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.BulkCreateEmployeesWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get all member organizations\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// member Id\n            /// </param>\n            public static IList<Organization> GetMemberOrganizations(this ICustomerModule operations, string id)\n            {\n                return operations.GetMemberOrganizationsAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get all member organizations\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// member Id\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Organization>> GetMemberOrganizationsAsync(this ICustomerModule operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetMemberOrganizationsWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class CustomerAddress\n    {\n        /// <summary>\n        /// Initializes a new instance of the CustomerAddress class.\n        /// </summary>\n        public CustomerAddress()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the CustomerAddress class.\n        /// </summary>\n        /// <param name=\"addressType\">Possible values include: 'Undefined',\n        /// 'Billing', 'Shipping', 'BillingAndShipping', 'Pickup'</param>\n        public CustomerAddress(string addressType = default(string), string key = default(string), string name = default(string), string organization = default(string), string countryCode = default(string), string countryName = default(string), string city = default(string), string postalCode = default(string), string zip = default(string), string line1 = default(string), string line2 = default(string), string regionId = default(string), string regionName = default(string), string firstName = default(string), string middleName = default(string), string lastName = default(string), string phone = default(string), string email = default(string), string outerId = default(string), bool? isDefault = default(bool?), string description = default(string))\n        {\n            AddressType = addressType;\n            Key = key;\n            Name = name;\n            Organization = organization;\n            CountryCode = countryCode;\n            CountryName = countryName;\n            City = city;\n            PostalCode = postalCode;\n            Zip = zip;\n            Line1 = line1;\n            Line2 = line2;\n            RegionId = regionId;\n            RegionName = regionName;\n            FirstName = firstName;\n            MiddleName = middleName;\n            LastName = lastName;\n            Phone = phone;\n            Email = email;\n            OuterId = outerId;\n            IsDefault = isDefault;\n            Description = description;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Undefined', 'Billing',\n        /// 'Shipping', 'BillingAndShipping', 'Pickup'\n        /// </summary>\n        [JsonProperty(PropertyName = \"addressType\")]\n        public string AddressType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"key\")]\n        public string Key { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"organization\")]\n        public string Organization { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"countryCode\")]\n        public string CountryCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"countryName\")]\n        public string CountryName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"city\")]\n        public string City { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"postalCode\")]\n        public string PostalCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"zip\")]\n        public string Zip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"line1\")]\n        public string Line1 { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"line2\")]\n        public string Line2 { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"regionId\")]\n        public string RegionId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"regionName\")]\n        public string RegionName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"firstName\")]\n        public string FirstName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"middleName\")]\n        public string MiddleName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"lastName\")]\n        public string LastName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"phone\")]\n        public string Phone { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"email\")]\n        public string Email { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isDefault\")]\n        public bool? IsDefault { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Note\n    {\n        /// <summary>\n        /// Initializes a new instance of the Note class.\n        /// </summary>\n        public Note()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Note class.\n        /// </summary>\n        public Note(string title = default(string), string body = default(string), string outerId = default(string), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Title = title;\n            Body = body;\n            OuterId = outerId;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"title\")]\n        public string Title { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"body\")]\n        public string Body { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicPropertyObjectValue\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyObjectValue class.\n        /// </summary>\n        public DynamicPropertyObjectValue()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyObjectValue class.\n        /// </summary>\n        /// <param name=\"valueType\">Possible values include: 'Undefined',\n        /// 'ShortText', 'LongText', 'Integer', 'Decimal', 'DateTime',\n        /// 'Boolean', 'Html', 'Image'</param>\n        public DynamicPropertyObjectValue(string objectType = default(string), string objectId = default(string), string locale = default(string), object value = default(object), string valueId = default(string), string valueType = default(string), string propertyId = default(string), string propertyName = default(string))\n        {\n            ObjectType = objectType;\n            ObjectId = objectId;\n            Locale = locale;\n            Value = value;\n            ValueId = valueId;\n            ValueType = valueType;\n            PropertyId = propertyId;\n            PropertyName = propertyName;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"locale\")]\n        public string Locale { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"value\")]\n        public object Value { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueId\")]\n        public string ValueId { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Undefined', 'ShortText',\n        /// 'LongText', 'Integer', 'Decimal', 'DateTime', 'Boolean', 'Html',\n        /// 'Image'\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueType\")]\n        public string ValueType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyId\")]\n        public string PropertyId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyName\")]\n        public string PropertyName { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicPropertyName\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyName class.\n        /// </summary>\n        public DynamicPropertyName()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyName class.\n        /// </summary>\n        public DynamicPropertyName(string locale = default(string), string name = default(string))\n        {\n            Locale = locale;\n            Name = name;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"locale\")]\n        public string Locale { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicObjectProperty\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicObjectProperty class.\n        /// </summary>\n        public DynamicObjectProperty()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the DynamicObjectProperty class.\n        /// </summary>\n        /// <param name=\"valueType\">Possible values include: 'Undefined',\n        /// 'ShortText', 'LongText', 'Integer', 'Decimal', 'DateTime',\n        /// 'Boolean', 'Html', 'Image'</param>\n        public DynamicObjectProperty(string objectId = default(string), IList<DynamicPropertyObjectValue> values = default(IList<DynamicPropertyObjectValue>), string name = default(string), string description = default(string), string objectType = default(string), bool? isArray = default(bool?), bool? isDictionary = default(bool?), bool? isMultilingual = default(bool?), bool? isRequired = default(bool?), int? displayOrder = default(int?), string valueType = default(string), IList<DynamicPropertyName> displayNames = default(IList<DynamicPropertyName>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            ObjectId = objectId;\n            Values = values;\n            Name = name;\n            Description = description;\n            ObjectType = objectType;\n            IsArray = isArray;\n            IsDictionary = isDictionary;\n            IsMultilingual = isMultilingual;\n            IsRequired = isRequired;\n            DisplayOrder = displayOrder;\n            ValueType = valueType;\n            DisplayNames = displayNames;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"values\")]\n        public IList<DynamicPropertyObjectValue> Values { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isArray\")]\n        public bool? IsArray { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isDictionary\")]\n        public bool? IsDictionary { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isMultilingual\")]\n        public bool? IsMultilingual { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isRequired\")]\n        public bool? IsRequired { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayOrder\")]\n        public int? DisplayOrder { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Undefined', 'ShortText',\n        /// 'LongText', 'Integer', 'Decimal', 'DateTime', 'Boolean', 'Html',\n        /// 'Image'\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueType\")]\n        public string ValueType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayNames\")]\n        public IList<DynamicPropertyName> DisplayNames { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SeoInfo\n    {\n        /// <summary>\n        /// Initializes a new instance of the SeoInfo class.\n        /// </summary>\n        public SeoInfo()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SeoInfo class.\n        /// </summary>\n        /// <param name=\"semanticUrl\">Slug</param>\n        /// <param name=\"pageTitle\">head title tag content</param>\n        /// <param name=\"metaDescription\">&lt;meta name=\"description\"\n        /// /&gt;</param>\n        /// <param name=\"metaKeywords\">&lt;meta name=\"keywords\" /&gt;</param>\n        /// <param name=\"storeId\">Tenant StoreId which SEO defined</param>\n        /// <param name=\"objectId\">SEO related object id</param>\n        /// <param name=\"objectType\">SEO related object type name</param>\n        /// <param name=\"isActive\">Active/Inactive</param>\n        public SeoInfo(string name = default(string), string semanticUrl = default(string), string pageTitle = default(string), string metaDescription = default(string), string imageAltDescription = default(string), string metaKeywords = default(string), string storeId = default(string), string objectId = default(string), string objectType = default(string), bool? isActive = default(bool?), string languageCode = default(string), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Name = name;\n            SemanticUrl = semanticUrl;\n            PageTitle = pageTitle;\n            MetaDescription = metaDescription;\n            ImageAltDescription = imageAltDescription;\n            MetaKeywords = metaKeywords;\n            StoreId = storeId;\n            ObjectId = objectId;\n            ObjectType = objectType;\n            IsActive = isActive;\n            LanguageCode = languageCode;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Gets or sets slug\n        /// </summary>\n        [JsonProperty(PropertyName = \"semanticUrl\")]\n        public string SemanticUrl { get; set; }\n\n        /// <summary>\n        /// Gets or sets head title tag content\n        /// </summary>\n        [JsonProperty(PropertyName = \"pageTitle\")]\n        public string PageTitle { get; set; }\n\n        /// <summary>\n        /// Gets or sets &amp;lt;meta name=\"description\" /&amp;gt;\n        /// </summary>\n        [JsonProperty(PropertyName = \"metaDescription\")]\n        public string MetaDescription { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"imageAltDescription\")]\n        public string ImageAltDescription { get; set; }\n\n        /// <summary>\n        /// Gets or sets &amp;lt;meta name=\"keywords\" /&amp;gt;\n        /// </summary>\n        [JsonProperty(PropertyName = \"metaKeywords\")]\n        public string MetaKeywords { get; set; }\n\n        /// <summary>\n        /// Gets or sets tenant StoreId which SEO defined\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeId\")]\n        public string StoreId { get; set; }\n\n        /// <summary>\n        /// Gets or sets SEO related object id\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// Gets or sets SEO related object type name\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// Gets or sets active/Inactive\n        /// </summary>\n        [JsonProperty(PropertyName = \"isActive\")]\n        public bool? IsActive { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Organization\n    {\n        /// <summary>\n        /// Initializes a new instance of the Organization class.\n        /// </summary>\n        public Organization()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Organization class.\n        /// </summary>\n        public Organization(string description = default(string), string businessCategory = default(string), string ownerId = default(string), string parentId = default(string), string objectType = default(string), string name = default(string), string memberType = default(string), string outerId = default(string), string status = default(string), IList<CustomerAddress> addresses = default(IList<CustomerAddress>), IList<string> phones = default(IList<string>), IList<string> emails = default(IList<string>), IList<Note> notes = default(IList<Note>), IList<string> groups = default(IList<string>), string iconUrl = default(string), IList<DynamicObjectProperty> dynamicProperties = default(IList<DynamicObjectProperty>), string seoObjectType = default(string), IList<SeoInfo> seoInfos = default(IList<SeoInfo>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Description = description;\n            BusinessCategory = businessCategory;\n            OwnerId = ownerId;\n            ParentId = parentId;\n            ObjectType = objectType;\n            Name = name;\n            MemberType = memberType;\n            OuterId = outerId;\n            Status = status;\n            Addresses = addresses;\n            Phones = phones;\n            Emails = emails;\n            Notes = notes;\n            Groups = groups;\n            IconUrl = iconUrl;\n            DynamicProperties = dynamicProperties;\n            SeoObjectType = seoObjectType;\n            SeoInfos = seoInfos;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"businessCategory\")]\n        public string BusinessCategory { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"ownerId\")]\n        public string OwnerId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"parentId\")]\n        public string ParentId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"memberType\")]\n        public string MemberType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"status\")]\n        public string Status { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"addresses\")]\n        public IList<CustomerAddress> Addresses { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"phones\")]\n        public IList<string> Phones { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"emails\")]\n        public IList<string> Emails { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"notes\")]\n        public IList<Note> Notes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"groups\")]\n        public IList<string> Groups { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"iconUrl\")]\n        public string IconUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"dynamicProperties\")]\n        public IList<DynamicObjectProperty> DynamicProperties { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoObjectType\")]\n        public string SeoObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoInfos\")]\n        public IList<SeoInfo> SeoInfos { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Member\n    {\n        /// <summary>\n        /// Initializes a new instance of the Member class.\n        /// </summary>\n        public Member()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Member class.\n        /// </summary>\n        public Member(string name = default(string), string memberType = default(string), string outerId = default(string), string status = default(string), IList<CustomerAddress> addresses = default(IList<CustomerAddress>), IList<string> phones = default(IList<string>), IList<string> emails = default(IList<string>), IList<Note> notes = default(IList<Note>), IList<string> groups = default(IList<string>), string iconUrl = default(string), string objectType = default(string), IList<DynamicObjectProperty> dynamicProperties = default(IList<DynamicObjectProperty>), string seoObjectType = default(string), IList<SeoInfo> seoInfos = default(IList<SeoInfo>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Name = name;\n            MemberType = memberType;\n            OuterId = outerId;\n            Status = status;\n            Addresses = addresses;\n            Phones = phones;\n            Emails = emails;\n            Notes = notes;\n            Groups = groups;\n            IconUrl = iconUrl;\n            ObjectType = objectType;\n            DynamicProperties = dynamicProperties;\n            SeoObjectType = seoObjectType;\n            SeoInfos = seoInfos;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"memberType\")]\n        public string MemberType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"status\")]\n        public string Status { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"addresses\")]\n        public IList<CustomerAddress> Addresses { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"phones\")]\n        public IList<string> Phones { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"emails\")]\n        public IList<string> Emails { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"notes\")]\n        public IList<Note> Notes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"groups\")]\n        public IList<string> Groups { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"iconUrl\")]\n        public string IconUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"dynamicProperties\")]\n        public IList<DynamicObjectProperty> DynamicProperties { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoObjectType\")]\n        public string SeoObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoInfos\")]\n        public IList<SeoInfo> SeoInfos { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class PermissionScope\n    {\n        /// <summary>\n        /// Initializes a new instance of the PermissionScope class.\n        /// </summary>\n        public PermissionScope()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PermissionScope class.\n        /// </summary>\n        public PermissionScope(string type = default(string), string label = default(string), string scope = default(string))\n        {\n            Type = type;\n            Label = label;\n            Scope = scope;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"label\")]\n        public string Label { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"scope\")]\n        public string Scope { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Permission\n    {\n        /// <summary>\n        /// Initializes a new instance of the Permission class.\n        /// </summary>\n        public Permission()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Permission class.\n        /// </summary>\n        public Permission(string id = default(string), string name = default(string), string moduleId = default(string), string groupName = default(string), IList<PermissionScope> assignedScopes = default(IList<PermissionScope>), IList<PermissionScope> availableScopes = default(IList<PermissionScope>))\n        {\n            Id = id;\n            Name = name;\n            ModuleId = moduleId;\n            GroupName = groupName;\n            AssignedScopes = assignedScopes;\n            AvailableScopes = availableScopes;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"moduleId\")]\n        public string ModuleId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"groupName\")]\n        public string GroupName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"assignedScopes\")]\n        public IList<PermissionScope> AssignedScopes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"availableScopes\")]\n        public IList<PermissionScope> AvailableScopes { get; private set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Role\n    {\n        /// <summary>\n        /// Initializes a new instance of the Role class.\n        /// </summary>\n        public Role()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Role class.\n        /// </summary>\n        public Role(string description = default(string), IList<Permission> permissions = default(IList<Permission>), string id = default(string), string name = default(string), string normalizedName = default(string), string concurrencyStamp = default(string))\n        {\n            Description = description;\n            Permissions = permissions;\n            Id = id;\n            Name = name;\n            NormalizedName = normalizedName;\n            ConcurrencyStamp = concurrencyStamp;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"permissions\")]\n        public IList<Permission> Permissions { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"normalizedName\")]\n        public string NormalizedName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"concurrencyStamp\")]\n        public string ConcurrencyStamp { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ApplicationUserLogin\n    {\n        /// <summary>\n        /// Initializes a new instance of the ApplicationUserLogin class.\n        /// </summary>\n        public ApplicationUserLogin()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ApplicationUserLogin class.\n        /// </summary>\n        public ApplicationUserLogin(string loginProvider = default(string), string providerKey = default(string))\n        {\n            LoginProvider = loginProvider;\n            ProviderKey = providerKey;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"loginProvider\")]\n        public string LoginProvider { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"providerKey\")]\n        public string ProviderKey { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ApplicationUser\n    {\n        /// <summary>\n        /// Initializes a new instance of the ApplicationUser class.\n        /// </summary>\n        public ApplicationUser()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ApplicationUser class.\n        /// </summary>\n        /// <param name=\"userState\">Possible values include: 'PendingApproval',\n        /// 'Approved', 'Rejected'</param>\n        public ApplicationUser(string storeId = default(string), string memberId = default(string), bool? isAdministrator = default(bool?), string photoUrl = default(string), string userType = default(string), string status = default(string), string password = default(string), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), IList<Role> roles = default(IList<Role>), System.DateTime? lockoutEndDateUtc = default(System.DateTime?), string userState = default(string), IList<string> permissions = default(IList<string>), IList<ApplicationUserLogin> logins = default(IList<ApplicationUserLogin>), bool? passwordExpired = default(bool?), System.DateTime? lastPasswordChangedDate = default(System.DateTime?), System.DateTime? lastPasswordChangeRequestDate = default(System.DateTime?), string id = default(string), string userName = default(string), string normalizedUserName = default(string), string email = default(string), string normalizedEmail = default(string), bool? emailConfirmed = default(bool?), string passwordHash = default(string), string securityStamp = default(string), string concurrencyStamp = default(string), string phoneNumber = default(string), bool? phoneNumberConfirmed = default(bool?), bool? twoFactorEnabled = default(bool?), System.DateTime? lockoutEnd = default(System.DateTime?), bool? lockoutEnabled = default(bool?), int? accessFailedCount = default(int?))\n        {\n            StoreId = storeId;\n            MemberId = memberId;\n            IsAdministrator = isAdministrator;\n            PhotoUrl = photoUrl;\n            UserType = userType;\n            Status = status;\n            Password = password;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Roles = roles;\n            LockoutEndDateUtc = lockoutEndDateUtc;\n            UserState = userState;\n            Permissions = permissions;\n            Logins = logins;\n            PasswordExpired = passwordExpired;\n            LastPasswordChangedDate = lastPasswordChangedDate;\n            LastPasswordChangeRequestDate = lastPasswordChangeRequestDate;\n            Id = id;\n            UserName = userName;\n            NormalizedUserName = normalizedUserName;\n            Email = email;\n            NormalizedEmail = normalizedEmail;\n            EmailConfirmed = emailConfirmed;\n            PasswordHash = passwordHash;\n            SecurityStamp = securityStamp;\n            ConcurrencyStamp = concurrencyStamp;\n            PhoneNumber = phoneNumber;\n            PhoneNumberConfirmed = phoneNumberConfirmed;\n            TwoFactorEnabled = twoFactorEnabled;\n            LockoutEnd = lockoutEnd;\n            LockoutEnabled = lockoutEnabled;\n            AccessFailedCount = accessFailedCount;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeId\")]\n        public string StoreId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"memberId\")]\n        public string MemberId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isAdministrator\")]\n        public bool? IsAdministrator { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"photoUrl\")]\n        public string PhotoUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"userType\")]\n        public string UserType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"status\")]\n        public string Status { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"password\")]\n        public string Password { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"roles\")]\n        public IList<Role> Roles { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"lockoutEndDateUtc\")]\n        public System.DateTime? LockoutEndDateUtc { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'PendingApproval',\n        /// 'Approved', 'Rejected'\n        /// </summary>\n        [JsonProperty(PropertyName = \"userState\")]\n        public string UserState { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"permissions\")]\n        public IList<string> Permissions { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"logins\")]\n        public IList<ApplicationUserLogin> Logins { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"passwordExpired\")]\n        public bool? PasswordExpired { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"lastPasswordChangedDate\")]\n        public System.DateTime? LastPasswordChangedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"lastPasswordChangeRequestDate\")]\n        public System.DateTime? LastPasswordChangeRequestDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"userName\")]\n        public string UserName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"normalizedUserName\")]\n        public string NormalizedUserName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"email\")]\n        public string Email { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"normalizedEmail\")]\n        public string NormalizedEmail { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"emailConfirmed\")]\n        public bool? EmailConfirmed { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"passwordHash\")]\n        public string PasswordHash { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"securityStamp\")]\n        public string SecurityStamp { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"concurrencyStamp\")]\n        public string ConcurrencyStamp { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"phoneNumber\")]\n        public string PhoneNumber { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"phoneNumberConfirmed\")]\n        public bool? PhoneNumberConfirmed { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"twoFactorEnabled\")]\n        public bool? TwoFactorEnabled { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"lockoutEnd\")]\n        public System.DateTime? LockoutEnd { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"lockoutEnabled\")]\n        public bool? LockoutEnabled { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"accessFailedCount\")]\n        public int? AccessFailedCount { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Contact\n    {\n        /// <summary>\n        /// Initializes a new instance of the Contact class.\n        /// </summary>\n        public Contact()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Contact class.\n        /// </summary>\n        public Contact(string salutation = default(string), string fullName = default(string), string firstName = default(string), string middleName = default(string), string lastName = default(string), System.DateTime? birthDate = default(System.DateTime?), string defaultLanguage = default(string), string timeZone = default(string), IList<string> organizations = default(IList<string>), IList<string> associatedOrganizations = default(IList<string>), string taxPayerId = default(string), string preferredDelivery = default(string), string preferredCommunication = default(string), string defaultShippingAddressId = default(string), string defaultBillingAddressId = default(string), string photoUrl = default(string), bool? isAnonymized = default(bool?), string about = default(string), string objectType = default(string), IList<ApplicationUser> securityAccounts = default(IList<ApplicationUser>), string name = default(string), string memberType = default(string), string outerId = default(string), string status = default(string), IList<CustomerAddress> addresses = default(IList<CustomerAddress>), IList<string> phones = default(IList<string>), IList<string> emails = default(IList<string>), IList<Note> notes = default(IList<Note>), IList<string> groups = default(IList<string>), string iconUrl = default(string), IList<DynamicObjectProperty> dynamicProperties = default(IList<DynamicObjectProperty>), string seoObjectType = default(string), IList<SeoInfo> seoInfos = default(IList<SeoInfo>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Salutation = salutation;\n            FullName = fullName;\n            FirstName = firstName;\n            MiddleName = middleName;\n            LastName = lastName;\n            BirthDate = birthDate;\n            DefaultLanguage = defaultLanguage;\n            TimeZone = timeZone;\n            Organizations = organizations;\n            AssociatedOrganizations = associatedOrganizations;\n            TaxPayerId = taxPayerId;\n            PreferredDelivery = preferredDelivery;\n            PreferredCommunication = preferredCommunication;\n            DefaultShippingAddressId = defaultShippingAddressId;\n            DefaultBillingAddressId = defaultBillingAddressId;\n            PhotoUrl = photoUrl;\n            IsAnonymized = isAnonymized;\n            About = about;\n            ObjectType = objectType;\n            SecurityAccounts = securityAccounts;\n            Name = name;\n            MemberType = memberType;\n            OuterId = outerId;\n            Status = status;\n            Addresses = addresses;\n            Phones = phones;\n            Emails = emails;\n            Notes = notes;\n            Groups = groups;\n            IconUrl = iconUrl;\n            DynamicProperties = dynamicProperties;\n            SeoObjectType = seoObjectType;\n            SeoInfos = seoInfos;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"salutation\")]\n        public string Salutation { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"fullName\")]\n        public string FullName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"firstName\")]\n        public string FirstName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"middleName\")]\n        public string MiddleName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"lastName\")]\n        public string LastName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"birthDate\")]\n        public System.DateTime? BirthDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"defaultLanguage\")]\n        public string DefaultLanguage { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"timeZone\")]\n        public string TimeZone { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"organizations\")]\n        public IList<string> Organizations { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"associatedOrganizations\")]\n        public IList<string> AssociatedOrganizations { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"taxPayerId\")]\n        public string TaxPayerId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"preferredDelivery\")]\n        public string PreferredDelivery { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"preferredCommunication\")]\n        public string PreferredCommunication { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"defaultShippingAddressId\")]\n        public string DefaultShippingAddressId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"defaultBillingAddressId\")]\n        public string DefaultBillingAddressId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"photoUrl\")]\n        public string PhotoUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isAnonymized\")]\n        public bool? IsAnonymized { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"about\")]\n        public string About { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"securityAccounts\")]\n        public IList<ApplicationUser> SecurityAccounts { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"memberType\")]\n        public string MemberType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"status\")]\n        public string Status { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"addresses\")]\n        public IList<CustomerAddress> Addresses { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"phones\")]\n        public IList<string> Phones { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"emails\")]\n        public IList<string> Emails { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"notes\")]\n        public IList<Note> Notes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"groups\")]\n        public IList<string> Groups { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"iconUrl\")]\n        public string IconUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"dynamicProperties\")]\n        public IList<DynamicObjectProperty> DynamicProperties { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoObjectType\")]\n        public string SeoObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoInfos\")]\n        public IList<SeoInfo> SeoInfos { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Vendor\n    {\n        /// <summary>\n        /// Initializes a new instance of the Vendor class.\n        /// </summary>\n        public Vendor()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Vendor class.\n        /// </summary>\n        public Vendor(string description = default(string), string siteUrl = default(string), string logoUrl = default(string), string groupName = default(string), IList<ApplicationUser> securityAccounts = default(IList<ApplicationUser>), string objectType = default(string), string name = default(string), string memberType = default(string), string outerId = default(string), string status = default(string), IList<CustomerAddress> addresses = default(IList<CustomerAddress>), IList<string> phones = default(IList<string>), IList<string> emails = default(IList<string>), IList<Note> notes = default(IList<Note>), IList<string> groups = default(IList<string>), string iconUrl = default(string), IList<DynamicObjectProperty> dynamicProperties = default(IList<DynamicObjectProperty>), string seoObjectType = default(string), IList<SeoInfo> seoInfos = default(IList<SeoInfo>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Description = description;\n            SiteUrl = siteUrl;\n            LogoUrl = logoUrl;\n            GroupName = groupName;\n            SecurityAccounts = securityAccounts;\n            ObjectType = objectType;\n            Name = name;\n            MemberType = memberType;\n            OuterId = outerId;\n            Status = status;\n            Addresses = addresses;\n            Phones = phones;\n            Emails = emails;\n            Notes = notes;\n            Groups = groups;\n            IconUrl = iconUrl;\n            DynamicProperties = dynamicProperties;\n            SeoObjectType = seoObjectType;\n            SeoInfos = seoInfos;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"siteUrl\")]\n        public string SiteUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"logoUrl\")]\n        public string LogoUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"groupName\")]\n        public string GroupName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"securityAccounts\")]\n        public IList<ApplicationUser> SecurityAccounts { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"memberType\")]\n        public string MemberType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"status\")]\n        public string Status { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"addresses\")]\n        public IList<CustomerAddress> Addresses { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"phones\")]\n        public IList<string> Phones { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"emails\")]\n        public IList<string> Emails { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"notes\")]\n        public IList<Note> Notes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"groups\")]\n        public IList<string> Groups { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"iconUrl\")]\n        public string IconUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"dynamicProperties\")]\n        public IList<DynamicObjectProperty> DynamicProperties { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoObjectType\")]\n        public string SeoObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoInfos\")]\n        public IList<SeoInfo> SeoInfos { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Employee\n    {\n        /// <summary>\n        /// Initializes a new instance of the Employee class.\n        /// </summary>\n        public Employee()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Employee class.\n        /// </summary>\n        public Employee(string salutation = default(string), string fullName = default(string), string firstName = default(string), string middleName = default(string), string lastName = default(string), System.DateTime? birthDate = default(System.DateTime?), string defaultLanguage = default(string), string timeZone = default(string), IList<string> organizations = default(IList<string>), string employeeType = default(string), bool? isActive = default(bool?), string photoUrl = default(string), string objectType = default(string), IList<ApplicationUser> securityAccounts = default(IList<ApplicationUser>), string name = default(string), string memberType = default(string), string outerId = default(string), string status = default(string), IList<CustomerAddress> addresses = default(IList<CustomerAddress>), IList<string> phones = default(IList<string>), IList<string> emails = default(IList<string>), IList<Note> notes = default(IList<Note>), IList<string> groups = default(IList<string>), string iconUrl = default(string), IList<DynamicObjectProperty> dynamicProperties = default(IList<DynamicObjectProperty>), string seoObjectType = default(string), IList<SeoInfo> seoInfos = default(IList<SeoInfo>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Salutation = salutation;\n            FullName = fullName;\n            FirstName = firstName;\n            MiddleName = middleName;\n            LastName = lastName;\n            BirthDate = birthDate;\n            DefaultLanguage = defaultLanguage;\n            TimeZone = timeZone;\n            Organizations = organizations;\n            EmployeeType = employeeType;\n            IsActive = isActive;\n            PhotoUrl = photoUrl;\n            ObjectType = objectType;\n            SecurityAccounts = securityAccounts;\n            Name = name;\n            MemberType = memberType;\n            OuterId = outerId;\n            Status = status;\n            Addresses = addresses;\n            Phones = phones;\n            Emails = emails;\n            Notes = notes;\n            Groups = groups;\n            IconUrl = iconUrl;\n            DynamicProperties = dynamicProperties;\n            SeoObjectType = seoObjectType;\n            SeoInfos = seoInfos;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"salutation\")]\n        public string Salutation { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"fullName\")]\n        public string FullName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"firstName\")]\n        public string FirstName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"middleName\")]\n        public string MiddleName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"lastName\")]\n        public string LastName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"birthDate\")]\n        public System.DateTime? BirthDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"defaultLanguage\")]\n        public string DefaultLanguage { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"timeZone\")]\n        public string TimeZone { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"organizations\")]\n        public IList<string> Organizations { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"employeeType\")]\n        public string EmployeeType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isActive\")]\n        public bool? IsActive { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"photoUrl\")]\n        public string PhotoUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"securityAccounts\")]\n        public IList<ApplicationUser> SecurityAccounts { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"memberType\")]\n        public string MemberType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"status\")]\n        public string Status { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"addresses\")]\n        public IList<CustomerAddress> Addresses { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"phones\")]\n        public IList<string> Phones { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"emails\")]\n        public IList<string> Emails { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"notes\")]\n        public IList<Note> Notes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"groups\")]\n        public IList<string> Groups { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"iconUrl\")]\n        public string IconUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"dynamicProperties\")]\n        public IList<DynamicObjectProperty> DynamicProperties { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoObjectType\")]\n        public string SeoObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoInfos\")]\n        public IList<SeoInfo> SeoInfos { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ContactSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the ContactSearchResult class.\n        /// </summary>\n        public ContactSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ContactSearchResult class.\n        /// </summary>\n        public ContactSearchResult(int? totalCount = default(int?), IList<Contact> results = default(IList<Contact>))\n        {\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<Contact> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class IconResizeRequest\n    {\n        /// <summary>\n        /// Initializes a new instance of the IconResizeRequest class.\n        /// </summary>\n        public IconResizeRequest()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the IconResizeRequest class.\n        /// </summary>\n        public IconResizeRequest(string url = default(string), int? width = default(int?), int? height = default(int?))\n        {\n            Url = url;\n            Width = width;\n            Height = height;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"url\")]\n        public string Url { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"width\")]\n        public int? Width { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"height\")]\n        public int? Height { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class MemberSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the MemberSearchResult class.\n        /// </summary>\n        public MemberSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the MemberSearchResult class.\n        /// </summary>\n        public MemberSearchResult(int? totalCount = default(int?), IList<Member> results = default(IList<Member>))\n        {\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<Member> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SortInfo\n    {\n        /// <summary>\n        /// Initializes a new instance of the SortInfo class.\n        /// </summary>\n        public SortInfo()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SortInfo class.\n        /// </summary>\n        /// <param name=\"sortDirection\">Possible values include: 'Ascending',\n        /// 'Descending'</param>\n        public SortInfo(string sortColumn = default(string), string sortDirection = default(string))\n        {\n            SortColumn = sortColumn;\n            SortDirection = sortDirection;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortColumn\")]\n        public string SortColumn { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Ascending', 'Descending'\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortDirection\")]\n        public string SortDirection { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class MembersSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the MembersSearchCriteria class.\n        /// </summary>\n        public MembersSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the MembersSearchCriteria class.\n        /// </summary>\n        public MembersSearchCriteria(string memberType = default(string), IList<string> memberTypes = default(IList<string>), string group = default(string), IList<string> groups = default(IList<string>), string memberId = default(string), bool? deepSearch = default(bool?), IList<string> outerIds = default(IList<string>), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            MemberType = memberType;\n            MemberTypes = memberTypes;\n            Group = group;\n            Groups = groups;\n            MemberId = memberId;\n            DeepSearch = deepSearch;\n            OuterIds = outerIds;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"memberType\")]\n        public string MemberType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"memberTypes\")]\n        public IList<string> MemberTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"group\")]\n        public string Group { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"groups\")]\n        public IList<string> Groups { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"memberId\")]\n        public string MemberId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"deepSearch\")]\n        public bool? DeepSearch { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerIds\")]\n        public IList<string> OuterIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class OrganizationSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the OrganizationSearchResult class.\n        /// </summary>\n        public OrganizationSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the OrganizationSearchResult class.\n        /// </summary>\n        public OrganizationSearchResult(int? totalCount = default(int?), IList<Organization> results = default(IList<Organization>))\n        {\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<Organization> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class StringIdentityUserRole\n    {\n        /// <summary>\n        /// Initializes a new instance of the StringIdentityUserRole class.\n        /// </summary>\n        public StringIdentityUserRole()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the StringIdentityUserRole class.\n        /// </summary>\n        public StringIdentityUserRole(string userId = default(string), string roleId = default(string))\n        {\n            UserId = userId;\n            RoleId = roleId;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"userId\")]\n        public string UserId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"roleId\")]\n        public string RoleId { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class VendorSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the VendorSearchResult class.\n        /// </summary>\n        public VendorSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the VendorSearchResult class.\n        /// </summary>\n        public VendorSearchResult(IList<Vendor> vendors = default(IList<Vendor>), int? totalCount = default(int?), IList<Vendor> results = default(IList<Vendor>))\n        {\n            Vendors = vendors;\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"vendors\")]\n        public IList<Vendor> Vendors { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<Vendor> Results { get; set; }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/AutoRestClients/NotificationsModuleApi.cs",
    "content": "// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class NotificationsModuleClient : ServiceClient<NotificationsModuleClient>, INotificationsModuleClient\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        public System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        public JsonSerializerSettings SerializationSettings { get; private set; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        public JsonSerializerSettings DeserializationSettings { get; private set; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client subscription.\n        /// </summary>\n        public ServiceClientCredentials Credentials { get; private set; }\n\n        /// <summary>\n        /// Gets the INotifications.\n        /// </summary>\n        public virtual INotifications Notifications { get; private set; }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationsModuleClient class.\n        /// </summary>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling NotificationsModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        protected NotificationsModuleClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationsModuleClient class.\n        /// </summary>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected NotificationsModuleClient(params DelegatingHandler[] handlers) : base(handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationsModuleClient class.\n        /// </summary>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected NotificationsModuleClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationsModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected NotificationsModuleClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationsModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected NotificationsModuleClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationsModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public NotificationsModuleClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationsModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling NotificationsModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public NotificationsModuleClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationsModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public NotificationsModuleClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationsModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public NotificationsModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationsModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public NotificationsModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// An optional partial-method to perform custom initialization.\n        ///</summary>\n        partial void CustomInitialize();\n        /// <summary>\n        /// Initializes client properties.\n        /// </summary>\n        private void Initialize()\n        {\n            Notifications = new Notifications(this);\n            BaseUri = new System.Uri(\"http://localhost\");\n            SerializationSettings = new JsonSerializerSettings\n            {\n                Formatting = Newtonsoft.Json.Formatting.Indented,\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new  List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            DeserializationSettings = new JsonSerializerSettings\n            {\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            CustomInitialize();\n        }\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// </summary>\n    public partial interface INotificationsModuleClient : System.IDisposable\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        JsonSerializerSettings SerializationSettings { get; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        JsonSerializerSettings DeserializationSettings { get; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client\n        /// subscription.\n        /// </summary>\n        ServiceClientCredentials Credentials { get; }\n\n\n        /// <summary>\n        /// Gets the INotifications.\n        /// </summary>\n        INotifications Notifications { get; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Notifications operations.\n    /// </summary>\n    public partial class Notifications : IServiceOperations<NotificationsModuleClient>, INotifications\n    {\n        /// <summary>\n        /// Initializes a new instance of the Notifications class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public Notifications(NotificationsModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the NotificationsModuleClient\n        /// </summary>\n        public NotificationsModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Get all registered notification types by criteria\n        /// </summary>\n        /// <param name='body'>\n        /// criteria for search(keyword, skip, take and etc.)\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<NotificationSearchResult>> GetNotificationsWithHttpMessagesAsync(NotificationSearchCriteria body = default(NotificationSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetNotifications\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/notifications\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<NotificationSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<NotificationSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get notification by type\n        /// </summary>\n        /// <remarks>\n        /// Get all notification templates by notification type, tenantId, teantTypeId.\n        /// Tenant id and tenant type id - params of tenant, that initialize creating\n        /// of\n        /// template. By default tenant id and tenant type id = \"Platform\". For example\n        /// for store with id = \"SampleStore\", tenantId = \"SampleStore\", tenantType =\n        /// \"Store\".\n        /// </remarks>\n        /// <param name='type'>\n        /// Notification type of template\n        /// </param>\n        /// <param name='tenantId'>\n        /// Tenant id of template\n        /// </param>\n        /// <param name='tenantType'>\n        /// Tenant type id of template\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Notification>> GetNotificationByTypeIdWithHttpMessagesAsync(string type, string tenantId = default(string), string tenantType = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (type == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"type\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"type\", type);\n                tracingParameters.Add(\"tenantId\", tenantId);\n                tracingParameters.Add(\"tenantType\", tenantType);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetNotificationByTypeId\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/notifications/{type}\").ToString();\n            _url = _url.Replace(\"{type}\", System.Uri.EscapeDataString(type));\n            List<string> _queryParameters = new List<string>();\n            if (tenantId != null)\n            {\n                _queryParameters.Add(string.Format(\"tenantId={0}\", System.Uri.EscapeDataString(tenantId)));\n            }\n            if (tenantType != null)\n            {\n                _queryParameters.Add(string.Format(\"tenantType={0}\", System.Uri.EscapeDataString(tenantType)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Notification>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Notification>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Update notification with templates\n        /// </summary>\n        /// <param name='type'>\n        /// </param>\n        /// <param name='body'>\n        /// Notification\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UpdateNotificationWithHttpMessagesAsync(string type, Notification body = default(Notification), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (type == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"type\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"type\", type);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdateNotification\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/notifications/{type}\").ToString();\n            _url = _url.Replace(\"{type}\", System.Uri.EscapeDataString(type));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Render content\n        /// </summary>\n        /// <param name='language'>\n        /// </param>\n        /// <param name='type'>\n        /// </param>\n        /// <param name='body'>\n        /// request of Notification Template with text and data\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> RenderingTemplateWithHttpMessagesAsync(string language, string type, NotificationTemplateRequest body = default(NotificationTemplateRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (language == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"language\");\n            }\n            if (type == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"type\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"language\", language);\n                tracingParameters.Add(\"type\", type);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"RenderingTemplate\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/notifications/{type}/templates/{language}/rendercontent\").ToString();\n            _url = _url.Replace(\"{language}\", System.Uri.EscapeDataString(language));\n            _url = _url.Replace(\"{type}\", System.Uri.EscapeDataString(type));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Sending notification\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<NotificationSendResult>> SendNotificationWithHttpMessagesAsync(Notification body = default(Notification), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SendNotification\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/notifications/send\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<NotificationSendResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<NotificationSendResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Schedule sending notification\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> ScheduleSendNotificationWithHttpMessagesAsync(Notification body = default(Notification), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ScheduleSendNotification\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/notifications/schedule\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Sending notification\n        /// </summary>\n        /// <remarks>\n        /// Method sending notification, that based on notification template. Template\n        /// for rendering chosen by type, objectId, objectTypeId, language.\n        /// Parameters for template may be prepared by the method of\n        /// getTestingParameters. Method returns string. If sending finished with\n        /// success status\n        /// this string is empty, otherwise string contains error message.\n        /// </remarks>\n        /// <param name='body'>\n        /// Notification request\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<NotificationSendResult>> SendNotificationByRequestWithHttpMessagesAsync(NotificationRequest body = default(NotificationRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SendNotificationByRequest\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/notification/template/sendnotification\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<NotificationSendResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<NotificationSendResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get all notification journal\n        /// </summary>\n        /// <remarks>\n        /// Method returns notification journal page with array of notification, that\n        /// was send, sending or will be send in future. Result contains total count,\n        /// that can be used\n        /// for paging.\n        /// </remarks>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<NotificationMessageSearchResult>> GetNotificationJournalWithHttpMessagesAsync(NotificationMessageSearchCriteria body = default(NotificationMessageSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetNotificationJournal\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/notifications/journal\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<NotificationMessageSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<NotificationMessageSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='id'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<NotificationMessage>> GetObjectNotificationJournalWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetObjectNotificationJournal\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/notifications/journal/{id}\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<NotificationMessage>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<NotificationMessage>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Notifications operations.\n    /// </summary>\n    public partial interface INotifications\n    {\n        /// <summary>\n        /// Get all registered notification types by criteria\n        /// </summary>\n        /// <param name='body'>\n        /// criteria for search(keyword, skip, take and etc.)\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<NotificationSearchResult>> GetNotificationsWithHttpMessagesAsync(NotificationSearchCriteria body = default(NotificationSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get notification by type\n        /// </summary>\n        /// <remarks>\n        /// Get all notification templates by notification type, tenantId,\n        /// teantTypeId. Tenant id and tenant type id - params of tenant, that\n        /// initialize creating of\n        /// template. By default tenant id and tenant type id = \"Platform\". For\n        /// example for store with id = \"SampleStore\", tenantId =\n        /// \"SampleStore\", tenantType = \"Store\".\n        /// </remarks>\n        /// <param name='type'>\n        /// Notification type of template\n        /// </param>\n        /// <param name='tenantId'>\n        /// Tenant id of template\n        /// </param>\n        /// <param name='tenantType'>\n        /// Tenant type id of template\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Notification>> GetNotificationByTypeIdWithHttpMessagesAsync(string type, string tenantId = default(string), string tenantType = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Update notification with templates\n        /// </summary>\n        /// <param name='type'>\n        /// </param>\n        /// <param name='body'>\n        /// Notification\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse> UpdateNotificationWithHttpMessagesAsync(string type, Notification body = default(Notification), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Render content\n        /// </summary>\n        /// <param name='language'>\n        /// </param>\n        /// <param name='type'>\n        /// </param>\n        /// <param name='body'>\n        /// request of Notification Template with text and data\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse> RenderingTemplateWithHttpMessagesAsync(string language, string type, NotificationTemplateRequest body = default(NotificationTemplateRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Sending notification\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<NotificationSendResult>> SendNotificationWithHttpMessagesAsync(Notification body = default(Notification), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Schedule sending notification\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> ScheduleSendNotificationWithHttpMessagesAsync(Notification body = default(Notification), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Sending notification\n        /// </summary>\n        /// <remarks>\n        /// Method sending notification, that based on notification template.\n        /// Template for rendering chosen by type, objectId, objectTypeId,\n        /// language.\n        /// Parameters for template may be prepared by the method of\n        /// getTestingParameters. Method returns string. If sending finished\n        /// with success status\n        /// this string is empty, otherwise string contains error message.\n        /// </remarks>\n        /// <param name='body'>\n        /// Notification request\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<NotificationSendResult>> SendNotificationByRequestWithHttpMessagesAsync(NotificationRequest body = default(NotificationRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get all notification journal\n        /// </summary>\n        /// <remarks>\n        /// Method returns notification journal page with array of\n        /// notification, that was send, sending or will be send in future.\n        /// Result contains total count, that can be used\n        /// for paging.\n        /// </remarks>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<NotificationMessageSearchResult>> GetNotificationJournalWithHttpMessagesAsync(NotificationMessageSearchCriteria body = default(NotificationMessageSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='id'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<NotificationMessage>> GetObjectNotificationJournalWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for Notifications.\n    /// </summary>\n    public static partial class NotificationsExtensions\n    {\n            /// <summary>\n            /// Get all registered notification types by criteria\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// criteria for search(keyword, skip, take and etc.)\n            /// </param>\n            public static NotificationSearchResult GetNotifications(this INotifications operations, NotificationSearchCriteria body = default(NotificationSearchCriteria))\n            {\n                return operations.GetNotificationsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get all registered notification types by criteria\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// criteria for search(keyword, skip, take and etc.)\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<NotificationSearchResult> GetNotificationsAsync(this INotifications operations, NotificationSearchCriteria body = default(NotificationSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetNotificationsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get notification by type\n            /// </summary>\n            /// <remarks>\n            /// Get all notification templates by notification type, tenantId, teantTypeId.\n            /// Tenant id and tenant type id - params of tenant, that initialize creating\n            /// of\n            /// template. By default tenant id and tenant type id = \"Platform\". For example\n            /// for store with id = \"SampleStore\", tenantId = \"SampleStore\", tenantType =\n            /// \"Store\".\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='type'>\n            /// Notification type of template\n            /// </param>\n            /// <param name='tenantId'>\n            /// Tenant id of template\n            /// </param>\n            /// <param name='tenantType'>\n            /// Tenant type id of template\n            /// </param>\n            public static Notification GetNotificationByTypeId(this INotifications operations, string type, string tenantId = default(string), string tenantType = default(string))\n            {\n                return operations.GetNotificationByTypeIdAsync(type, tenantId, tenantType).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get notification by type\n            /// </summary>\n            /// <remarks>\n            /// Get all notification templates by notification type, tenantId, teantTypeId.\n            /// Tenant id and tenant type id - params of tenant, that initialize creating\n            /// of\n            /// template. By default tenant id and tenant type id = \"Platform\". For example\n            /// for store with id = \"SampleStore\", tenantId = \"SampleStore\", tenantType =\n            /// \"Store\".\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='type'>\n            /// Notification type of template\n            /// </param>\n            /// <param name='tenantId'>\n            /// Tenant id of template\n            /// </param>\n            /// <param name='tenantType'>\n            /// Tenant type id of template\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Notification> GetNotificationByTypeIdAsync(this INotifications operations, string type, string tenantId = default(string), string tenantType = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetNotificationByTypeIdWithHttpMessagesAsync(type, tenantId, tenantType, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Update notification with templates\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='type'>\n            /// </param>\n            /// <param name='body'>\n            /// Notification\n            /// </param>\n            public static void UpdateNotification(this INotifications operations, string type, Notification body = default(Notification))\n            {\n                operations.UpdateNotificationAsync(type, body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Update notification with templates\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='type'>\n            /// </param>\n            /// <param name='body'>\n            /// Notification\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UpdateNotificationAsync(this INotifications operations, string type, Notification body = default(Notification), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UpdateNotificationWithHttpMessagesAsync(type, body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Render content\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='language'>\n            /// </param>\n            /// <param name='type'>\n            /// </param>\n            /// <param name='body'>\n            /// request of Notification Template with text and data\n            /// </param>\n            public static void RenderingTemplate(this INotifications operations, string language, string type, NotificationTemplateRequest body = default(NotificationTemplateRequest))\n            {\n                operations.RenderingTemplateAsync(language, type, body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Render content\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='language'>\n            /// </param>\n            /// <param name='type'>\n            /// </param>\n            /// <param name='body'>\n            /// request of Notification Template with text and data\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task RenderingTemplateAsync(this INotifications operations, string language, string type, NotificationTemplateRequest body = default(NotificationTemplateRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.RenderingTemplateWithHttpMessagesAsync(language, type, body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Sending notification\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static NotificationSendResult SendNotification(this INotifications operations, Notification body = default(Notification))\n            {\n                return operations.SendNotificationAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Sending notification\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<NotificationSendResult> SendNotificationAsync(this INotifications operations, Notification body = default(Notification), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SendNotificationWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Schedule sending notification\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void ScheduleSendNotification(this INotifications operations, Notification body = default(Notification))\n            {\n                operations.ScheduleSendNotificationAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Schedule sending notification\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task ScheduleSendNotificationAsync(this INotifications operations, Notification body = default(Notification), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.ScheduleSendNotificationWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Sending notification\n            /// </summary>\n            /// <remarks>\n            /// Method sending notification, that based on notification template. Template\n            /// for rendering chosen by type, objectId, objectTypeId, language.\n            /// Parameters for template may be prepared by the method of\n            /// getTestingParameters. Method returns string. If sending finished with\n            /// success status\n            /// this string is empty, otherwise string contains error message.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Notification request\n            /// </param>\n            public static NotificationSendResult SendNotificationByRequest(this INotifications operations, NotificationRequest body = default(NotificationRequest))\n            {\n                return operations.SendNotificationByRequestAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Sending notification\n            /// </summary>\n            /// <remarks>\n            /// Method sending notification, that based on notification template. Template\n            /// for rendering chosen by type, objectId, objectTypeId, language.\n            /// Parameters for template may be prepared by the method of\n            /// getTestingParameters. Method returns string. If sending finished with\n            /// success status\n            /// this string is empty, otherwise string contains error message.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Notification request\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<NotificationSendResult> SendNotificationByRequestAsync(this INotifications operations, NotificationRequest body = default(NotificationRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SendNotificationByRequestWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get all notification journal\n            /// </summary>\n            /// <remarks>\n            /// Method returns notification journal page with array of notification, that\n            /// was send, sending or will be send in future. Result contains total count,\n            /// that can be used\n            /// for paging.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static NotificationMessageSearchResult GetNotificationJournal(this INotifications operations, NotificationMessageSearchCriteria body = default(NotificationMessageSearchCriteria))\n            {\n                return operations.GetNotificationJournalAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get all notification journal\n            /// </summary>\n            /// <remarks>\n            /// Method returns notification journal page with array of notification, that\n            /// was send, sending or will be send in future. Result contains total count,\n            /// that can be used\n            /// for paging.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<NotificationMessageSearchResult> GetNotificationJournalAsync(this INotifications operations, NotificationMessageSearchCriteria body = default(NotificationMessageSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetNotificationJournalWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// </param>\n            public static NotificationMessage GetObjectNotificationJournal(this INotifications operations, string id)\n            {\n                return operations.GetObjectNotificationJournalAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<NotificationMessage> GetObjectNotificationJournalAsync(this INotifications operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetObjectNotificationJournalWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SortInfo\n    {\n        /// <summary>\n        /// Initializes a new instance of the SortInfo class.\n        /// </summary>\n        public SortInfo()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SortInfo class.\n        /// </summary>\n        /// <param name=\"sortDirection\">Possible values include: 'Ascending',\n        /// 'Descending'</param>\n        public SortInfo(string sortColumn = default(string), string sortDirection = default(string))\n        {\n            SortColumn = sortColumn;\n            SortDirection = sortDirection;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortColumn\")]\n        public string SortColumn { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Ascending', 'Descending'\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortDirection\")]\n        public string SortDirection { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Criteria for searching\n    /// </summary>\n    public partial class NotificationSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the NotificationSearchCriteria class.\n        /// </summary>\n        public NotificationSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationSearchCriteria class.\n        /// </summary>\n        /// <param name=\"tenantId\">Owner Id of Notification</param>\n        /// <param name=\"tenantType\">Owner Type of Notification</param>\n        /// <param name=\"isActive\">only active notification</param>\n        public NotificationSearchCriteria(string notificationType = default(string), string tenantId = default(string), string tenantType = default(string), bool? isActive = default(bool?), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            NotificationType = notificationType;\n            TenantId = tenantId;\n            TenantType = tenantType;\n            IsActive = isActive;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"notificationType\")]\n        public string NotificationType { get; set; }\n\n        /// <summary>\n        /// Gets or sets owner Id of Notification\n        /// </summary>\n        [JsonProperty(PropertyName = \"tenantId\")]\n        public string TenantId { get; set; }\n\n        /// <summary>\n        /// Gets or sets owner Type of Notification\n        /// </summary>\n        [JsonProperty(PropertyName = \"tenantType\")]\n        public string TenantType { get; set; }\n\n        /// <summary>\n        /// Gets or sets only active notification\n        /// </summary>\n        [JsonProperty(PropertyName = \"isActive\")]\n        public bool? IsActive { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class TenantIdentity\n    {\n        /// <summary>\n        /// Initializes a new instance of the TenantIdentity class.\n        /// </summary>\n        public TenantIdentity()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the TenantIdentity class.\n        /// </summary>\n        public TenantIdentity(string id = default(string), string type = default(string), bool? isEmpty = default(bool?), bool? isValid = default(bool?))\n        {\n            Id = id;\n            Type = type;\n            IsEmpty = isEmpty;\n            IsValid = isValid;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isEmpty\")]\n        public bool? IsEmpty { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isValid\")]\n        public bool? IsValid { get; private set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Template of Notification with a different language\n    /// </summary>\n    public partial class NotificationTemplate\n    {\n        /// <summary>\n        /// Initializes a new instance of the NotificationTemplate class.\n        /// </summary>\n        public NotificationTemplate()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationTemplate class.\n        /// </summary>\n        /// <param name=\"languageCode\">Code of Language</param>\n        /// <param name=\"kind\">For detecting kind of notifications (email, sms\n        /// and etc.)</param>\n        public NotificationTemplate(string languageCode = default(string), string kind = default(string), bool? isReadonly = default(bool?), string outerId = default(string), bool? isPredefined = default(bool?), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            LanguageCode = languageCode;\n            Kind = kind;\n            IsReadonly = isReadonly;\n            OuterId = outerId;\n            IsPredefined = isPredefined;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets code of Language\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// Gets for detecting kind of notifications (email, sms and etc.)\n        /// </summary>\n        [JsonProperty(PropertyName = \"kind\")]\n        public string Kind { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isReadonly\")]\n        public bool? IsReadonly { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isPredefined\")]\n        public bool? IsPredefined { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Base class for Notification\n    /// </summary>\n    public partial class Notification\n    {\n        /// <summary>\n        /// Initializes a new instance of the Notification class.\n        /// </summary>\n        public Notification()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Notification class.\n        /// </summary>\n        /// <param name=\"alias\">This field represents an alias for the\n        /// notification type\n        /// and is used only for backward compatibility with old notification\n        /// names\n        /// that are stored and used by API clients.</param>\n        /// <param name=\"type\">Type of notifications, like Identifier</param>\n        /// <param name=\"kind\">For detecting kind of notifications (email, sms\n        /// and etc.)</param>\n        public Notification(TenantIdentity tenantIdentity = default(TenantIdentity), bool? isActive = default(bool?), string languageCode = default(string), string alias = default(string), string type = default(string), string kind = default(string), string outerId = default(string), IList<NotificationTemplate> templates = default(IList<NotificationTemplate>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            TenantIdentity = tenantIdentity;\n            IsActive = isActive;\n            LanguageCode = languageCode;\n            Alias = alias;\n            Type = type;\n            Kind = kind;\n            OuterId = outerId;\n            Templates = templates;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"tenantIdentity\")]\n        public TenantIdentity TenantIdentity { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isActive\")]\n        public bool? IsActive { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// Gets or sets this field represents an alias for the notification\n        /// type\n        /// and is used only for backward compatibility with old notification\n        /// names\n        /// that are stored and used by API clients.\n        /// </summary>\n        [JsonProperty(PropertyName = \"alias\")]\n        public string Alias { get; set; }\n\n        /// <summary>\n        /// Gets or sets type of notifications, like Identifier\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n        /// <summary>\n        /// Gets for detecting kind of notifications (email, sms and etc.)\n        /// </summary>\n        [JsonProperty(PropertyName = \"kind\")]\n        public string Kind { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"templates\")]\n        public IList<NotificationTemplate> Templates { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class NotificationSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the NotificationSearchResult class.\n        /// </summary>\n        public NotificationSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationSearchResult class.\n        /// </summary>\n        public NotificationSearchResult(int? totalCount = default(int?), IList<Notification> results = default(IList<Notification>))\n        {\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<Notification> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class NotificationTemplateRequest\n    {\n        /// <summary>\n        /// Initializes a new instance of the NotificationTemplateRequest\n        /// class.\n        /// </summary>\n        public NotificationTemplateRequest()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationTemplateRequest\n        /// class.\n        /// </summary>\n        public NotificationTemplateRequest(string text = default(string), Notification data = default(Notification))\n        {\n            Text = text;\n            Data = data;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"text\")]\n        public string Text { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"data\")]\n        public Notification Data { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Result of notification sending\n    /// </summary>\n    public partial class NotificationSendResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the NotificationSendResult class.\n        /// </summary>\n        public NotificationSendResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationSendResult class.\n        /// </summary>\n        public NotificationSendResult(string errorMessage = default(string), bool? isSuccess = default(bool?))\n        {\n            ErrorMessage = errorMessage;\n            IsSuccess = isSuccess;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"errorMessage\")]\n        public string ErrorMessage { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isSuccess\")]\n        public bool? IsSuccess { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class NotificationParameter\n    {\n        /// <summary>\n        /// Initializes a new instance of the NotificationParameter class.\n        /// </summary>\n        public NotificationParameter()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationParameter class.\n        /// </summary>\n        /// <param name=\"type\">Possible values include: 'String', 'Integer',\n        /// 'Decimal', 'DateTime', 'Boolean'</param>\n        public NotificationParameter(string parameterName = default(string), string parameterDescription = default(string), string parameterCodeInView = default(string), bool? isDictionary = default(bool?), bool? isArray = default(bool?), string type = default(string), object value = default(object))\n        {\n            ParameterName = parameterName;\n            ParameterDescription = parameterDescription;\n            ParameterCodeInView = parameterCodeInView;\n            IsDictionary = isDictionary;\n            IsArray = isArray;\n            Type = type;\n            Value = value;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"parameterName\")]\n        public string ParameterName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"parameterDescription\")]\n        public string ParameterDescription { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"parameterCodeInView\")]\n        public string ParameterCodeInView { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isDictionary\")]\n        public bool? IsDictionary { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isArray\")]\n        public bool? IsArray { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'String', 'Integer',\n        /// 'Decimal', 'DateTime', 'Boolean'\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"value\")]\n        public object Value { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class NotificationRequest\n    {\n        /// <summary>\n        /// Initializes a new instance of the NotificationRequest class.\n        /// </summary>\n        public NotificationRequest()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationRequest class.\n        /// </summary>\n        public NotificationRequest(string type = default(string), string objectId = default(string), string objectTypeId = default(string), string language = default(string), IList<NotificationParameter> notificationParameters = default(IList<NotificationParameter>))\n        {\n            Type = type;\n            ObjectId = objectId;\n            ObjectTypeId = objectTypeId;\n            Language = language;\n            NotificationParameters = notificationParameters;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypeId\")]\n        public string ObjectTypeId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"language\")]\n        public string Language { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"notificationParameters\")]\n        public IList<NotificationParameter> NotificationParameters { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class NotificationMessageSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the NotificationMessageSearchCriteria\n        /// class.\n        /// </summary>\n        public NotificationMessageSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationMessageSearchCriteria\n        /// class.\n        /// </summary>\n        public NotificationMessageSearchCriteria(string notificationType = default(string), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            NotificationType = notificationType;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"notificationType\")]\n        public string NotificationType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Base class for message of a notification with information about sending\n    /// </summary>\n    public partial class NotificationMessage\n    {\n        /// <summary>\n        /// Initializes a new instance of the NotificationMessage class.\n        /// </summary>\n        public NotificationMessage()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationMessage class.\n        /// </summary>\n        /// <param name=\"notificationId\">Id of Notification</param>\n        /// <param name=\"notificationType\">Type of Notification</param>\n        /// <param name=\"sendAttemptCount\">Count of sending attempt</param>\n        /// <param name=\"maxSendAttemptCount\">Max count of sending\n        /// attempt</param>\n        /// <param name=\"lastSendError\">The last error of sending</param>\n        /// <param name=\"lastSendAttemptDate\">The last date of sending\n        /// attempt</param>\n        /// <param name=\"sendDate\">Date of sending</param>\n        /// <param name=\"languageCode\">Code of language</param>\n        public NotificationMessage(string kind = default(string), TenantIdentity tenantIdentity = default(TenantIdentity), string notificationId = default(string), string notificationType = default(string), int? sendAttemptCount = default(int?), int? maxSendAttemptCount = default(int?), string lastSendError = default(string), System.DateTime? lastSendAttemptDate = default(System.DateTime?), System.DateTime? sendDate = default(System.DateTime?), string languageCode = default(string), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Kind = kind;\n            TenantIdentity = tenantIdentity;\n            NotificationId = notificationId;\n            NotificationType = notificationType;\n            SendAttemptCount = sendAttemptCount;\n            MaxSendAttemptCount = maxSendAttemptCount;\n            LastSendError = lastSendError;\n            LastSendAttemptDate = lastSendAttemptDate;\n            SendDate = sendDate;\n            LanguageCode = languageCode;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"kind\")]\n        public string Kind { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"tenantIdentity\")]\n        public TenantIdentity TenantIdentity { get; set; }\n\n        /// <summary>\n        /// Gets or sets id of Notification\n        /// </summary>\n        [JsonProperty(PropertyName = \"notificationId\")]\n        public string NotificationId { get; set; }\n\n        /// <summary>\n        /// Gets or sets type of Notification\n        /// </summary>\n        [JsonProperty(PropertyName = \"notificationType\")]\n        public string NotificationType { get; set; }\n\n        /// <summary>\n        /// Gets or sets count of sending attempt\n        /// </summary>\n        [JsonProperty(PropertyName = \"sendAttemptCount\")]\n        public int? SendAttemptCount { get; set; }\n\n        /// <summary>\n        /// Gets or sets max count of sending attempt\n        /// </summary>\n        [JsonProperty(PropertyName = \"maxSendAttemptCount\")]\n        public int? MaxSendAttemptCount { get; set; }\n\n        /// <summary>\n        /// Gets or sets the last error of sending\n        /// </summary>\n        [JsonProperty(PropertyName = \"lastSendError\")]\n        public string LastSendError { get; set; }\n\n        /// <summary>\n        /// Gets or sets the last date of sending attempt\n        /// </summary>\n        [JsonProperty(PropertyName = \"lastSendAttemptDate\")]\n        public System.DateTime? LastSendAttemptDate { get; set; }\n\n        /// <summary>\n        /// Gets or sets date of sending\n        /// </summary>\n        [JsonProperty(PropertyName = \"sendDate\")]\n        public System.DateTime? SendDate { get; set; }\n\n        /// <summary>\n        /// Gets or sets code of language\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class NotificationMessageSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the NotificationMessageSearchResult\n        /// class.\n        /// </summary>\n        public NotificationMessageSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the NotificationMessageSearchResult\n        /// class.\n        /// </summary>\n        public NotificationMessageSearchResult(int? totalCount = default(int?), IList<NotificationMessage> results = default(IList<NotificationMessage>))\n        {\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<NotificationMessage> Results { get; set; }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/AutoRestClients/PlatformModuleApi.cs",
    "content": "// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Virto Commerce provides API documentation in two formats, JSON and\n    /// YAML, with schema files generated as swagger.json and swagger.yaml. To\n    /// ensure secure access, authorization filters can be applied using a\n    /// specific key to grant access. This allows authorized users to securely\n    /// interact with the API and access the necessary resources while\n    /// maintaining confidentiality and data integrity.\n    /// </summary>\n    public partial class PlatformModuleClient : ServiceClient<PlatformModuleClient>, IPlatformModuleClient\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        public System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        public JsonSerializerSettings SerializationSettings { get; private set; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        public JsonSerializerSettings DeserializationSettings { get; private set; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client subscription.\n        /// </summary>\n        public ServiceClientCredentials Credentials { get; private set; }\n\n        /// <summary>\n        /// Gets the IAuthorization.\n        /// </summary>\n        public virtual IAuthorization Authorization { get; private set; }\n\n        /// <summary>\n        /// Gets the IExternalSignIn.\n        /// </summary>\n        public virtual IExternalSignIn ExternalSignIn { get; private set; }\n\n        /// <summary>\n        /// Gets the IApps.\n        /// </summary>\n        public virtual IApps Apps { get; private set; }\n\n        /// <summary>\n        /// Gets the IChangeLog.\n        /// </summary>\n        public virtual IChangeLog ChangeLog { get; private set; }\n\n        /// <summary>\n        /// Gets the IDiagnostics.\n        /// </summary>\n        public virtual IDiagnostics Diagnostics { get; private set; }\n\n        /// <summary>\n        /// Gets the IDynamicProperties.\n        /// </summary>\n        public virtual IDynamicProperties DynamicProperties { get; private set; }\n\n        /// <summary>\n        /// Gets the IJobs.\n        /// </summary>\n        public virtual IJobs Jobs { get; private set; }\n\n        /// <summary>\n        /// Gets the IModules.\n        /// </summary>\n        public virtual IModules Modules { get; private set; }\n\n        /// <summary>\n        /// Gets the IOAuthApps.\n        /// </summary>\n        public virtual IOAuthApps OAuthApps { get; private set; }\n\n        /// <summary>\n        /// Gets the IPushNotificationOperations.\n        /// </summary>\n        public virtual IPushNotificationOperations PushNotification { get; private set; }\n\n        /// <summary>\n        /// Gets the ISecurity.\n        /// </summary>\n        public virtual ISecurity Security { get; private set; }\n\n        /// <summary>\n        /// Gets the ISetting.\n        /// </summary>\n        public virtual ISetting Setting { get; private set; }\n\n        /// <summary>\n        /// Initializes a new instance of the PlatformModuleClient class.\n        /// </summary>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling PlatformModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        protected PlatformModuleClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PlatformModuleClient class.\n        /// </summary>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected PlatformModuleClient(params DelegatingHandler[] handlers) : base(handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PlatformModuleClient class.\n        /// </summary>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected PlatformModuleClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PlatformModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected PlatformModuleClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PlatformModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected PlatformModuleClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PlatformModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public PlatformModuleClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PlatformModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling PlatformModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public PlatformModuleClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PlatformModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public PlatformModuleClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PlatformModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public PlatformModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PlatformModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public PlatformModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// An optional partial-method to perform custom initialization.\n        ///</summary>\n        partial void CustomInitialize();\n        /// <summary>\n        /// Initializes client properties.\n        /// </summary>\n        private void Initialize()\n        {\n            Authorization = new Authorization(this);\n            ExternalSignIn = new ExternalSignIn(this);\n            Apps = new Apps(this);\n            ChangeLog = new ChangeLog(this);\n            Diagnostics = new Diagnostics(this);\n            DynamicProperties = new DynamicProperties(this);\n            Jobs = new Jobs(this);\n            Modules = new Modules(this);\n            OAuthApps = new OAuthApps(this);\n            PushNotification = new PushNotificationOperations(this);\n            Security = new Security(this);\n            Setting = new Setting(this);\n            BaseUri = new System.Uri(\"http://localhost\");\n            SerializationSettings = new JsonSerializerSettings\n            {\n                Formatting = Newtonsoft.Json.Formatting.Indented,\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new  List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            DeserializationSettings = new JsonSerializerSettings\n            {\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            CustomInitialize();\n        }\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Virto Commerce provides API documentation in two formats, JSON and\n    /// YAML, with schema files generated as swagger.json and swagger.yaml. To\n    /// ensure secure access, authorization filters can be applied using a\n    /// specific key to grant access. This allows authorized users to securely\n    /// interact with the API and access the necessary resources while\n    /// maintaining confidentiality and data integrity.\n    /// </summary>\n    public partial interface IPlatformModuleClient : System.IDisposable\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        JsonSerializerSettings SerializationSettings { get; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        JsonSerializerSettings DeserializationSettings { get; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client\n        /// subscription.\n        /// </summary>\n        ServiceClientCredentials Credentials { get; }\n\n\n        /// <summary>\n        /// Gets the IAuthorization.\n        /// </summary>\n        IAuthorization Authorization { get; }\n\n        /// <summary>\n        /// Gets the IExternalSignIn.\n        /// </summary>\n        IExternalSignIn ExternalSignIn { get; }\n\n        /// <summary>\n        /// Gets the IApps.\n        /// </summary>\n        IApps Apps { get; }\n\n        /// <summary>\n        /// Gets the IChangeLog.\n        /// </summary>\n        IChangeLog ChangeLog { get; }\n\n        /// <summary>\n        /// Gets the IDiagnostics.\n        /// </summary>\n        IDiagnostics Diagnostics { get; }\n\n        /// <summary>\n        /// Gets the IDynamicProperties.\n        /// </summary>\n        IDynamicProperties DynamicProperties { get; }\n\n        /// <summary>\n        /// Gets the IJobs.\n        /// </summary>\n        IJobs Jobs { get; }\n\n        /// <summary>\n        /// Gets the IModules.\n        /// </summary>\n        IModules Modules { get; }\n\n        /// <summary>\n        /// Gets the IOAuthApps.\n        /// </summary>\n        IOAuthApps OAuthApps { get; }\n\n        /// <summary>\n        /// Gets the IPushNotificationOperations.\n        /// </summary>\n        IPushNotificationOperations PushNotification { get; }\n\n        /// <summary>\n        /// Gets the ISecurity.\n        /// </summary>\n        ISecurity Security { get; }\n\n        /// <summary>\n        /// Gets the ISetting.\n        /// </summary>\n        ISetting Setting { get; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Authorization operations.\n    /// </summary>\n    public partial class Authorization : IServiceOperations<PlatformModuleClient>, IAuthorization\n    {\n        /// <summary>\n        /// Initializes a new instance of the Authorization class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public Authorization(PlatformModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the PlatformModuleClient\n        /// </summary>\n        public PlatformModuleClient Client { get; private set; }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<OpenIddictResponse>> ExchangeWithHttpMessagesAsync(Paths1gq0sd1connectTokenpostrequestbodycontentapplicationJsonPatchJsonschema body, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (body == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"body\");\n            }\n            if (body != null)\n            {\n                body.Validate();\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"Exchange\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"connect/token\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 400)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<OpenIddictResponse>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<OpenIddictResponse>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            // Deserialize Response\n            if ((int)_statusCode == 400)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<OpenIddictResponse>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Authorization operations.\n    /// </summary>\n    public partial interface IAuthorization\n    {\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<OpenIddictResponse>> ExchangeWithHttpMessagesAsync(Paths1gq0sd1connectTokenpostrequestbodycontentapplicationJsonPatchJsonschema body, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for Authorization.\n    /// </summary>\n    public static partial class AuthorizationExtensions\n    {\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static OpenIddictResponse Exchange(this IAuthorization operations, Paths1gq0sd1connectTokenpostrequestbodycontentapplicationJsonPatchJsonschema body)\n            {\n                return operations.ExchangeAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<OpenIddictResponse> ExchangeAsync(this IAuthorization operations, Paths1gq0sd1connectTokenpostrequestbodycontentapplicationJsonPatchJsonschema body, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.ExchangeWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// ExternalSignIn operations.\n    /// </summary>\n    public partial class ExternalSignIn : IServiceOperations<PlatformModuleClient>, IExternalSignIn\n    {\n        /// <summary>\n        /// Initializes a new instance of the ExternalSignIn class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public ExternalSignIn(PlatformModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the PlatformModuleClient\n        /// </summary>\n        public PlatformModuleClient Client { get; private set; }\n\n        /// <param name='authenticationType'>\n        /// </param>\n        /// <param name='returnUrl'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> SignInWithHttpMessagesAsync(string authenticationType = default(string), string returnUrl = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"authenticationType\", authenticationType);\n                tracingParameters.Add(\"returnUrl\", returnUrl);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SignIn\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"externalsignin\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (authenticationType != null)\n            {\n                _queryParameters.Add(string.Format(\"authenticationType={0}\", System.Uri.EscapeDataString(authenticationType)));\n            }\n            if (returnUrl != null)\n            {\n                _queryParameters.Add(string.Format(\"returnUrl={0}\", System.Uri.EscapeDataString(returnUrl)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='authenticationType'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> SignOutWithHttpMessagesAsync(string authenticationType = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"authenticationType\", authenticationType);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SignOut\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"externalsignin/signout\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (authenticationType != null)\n            {\n                _queryParameters.Add(string.Format(\"authenticationType={0}\", System.Uri.EscapeDataString(authenticationType)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='returnUrl'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> SignInCallbackWithHttpMessagesAsync(string returnUrl = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"returnUrl\", returnUrl);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SignInCallback\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"externalsignin/callback\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (returnUrl != null)\n            {\n                _queryParameters.Add(string.Format(\"returnUrl={0}\", System.Uri.EscapeDataString(returnUrl)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<ExternalSignInProviderInfo>>> GetExternalLoginProvidersWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetExternalLoginProviders\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"externalsignin/providers\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<ExternalSignInProviderInfo>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<ExternalSignInProviderInfo>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// ExternalSignIn operations.\n    /// </summary>\n    public partial interface IExternalSignIn\n    {\n        /// <param name='authenticationType'>\n        /// </param>\n        /// <param name='returnUrl'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> SignInWithHttpMessagesAsync(string authenticationType = default(string), string returnUrl = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='authenticationType'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> SignOutWithHttpMessagesAsync(string authenticationType = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='returnUrl'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> SignInCallbackWithHttpMessagesAsync(string returnUrl = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<ExternalSignInProviderInfo>>> GetExternalLoginProvidersWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for ExternalSignIn.\n    /// </summary>\n    public static partial class ExternalSignInExtensions\n    {\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='authenticationType'>\n            /// </param>\n            /// <param name='returnUrl'>\n            /// </param>\n            public static void SignIn(this IExternalSignIn operations, string authenticationType = default(string), string returnUrl = default(string))\n            {\n                operations.SignInAsync(authenticationType, returnUrl).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='authenticationType'>\n            /// </param>\n            /// <param name='returnUrl'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task SignInAsync(this IExternalSignIn operations, string authenticationType = default(string), string returnUrl = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.SignInWithHttpMessagesAsync(authenticationType, returnUrl, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='authenticationType'>\n            /// </param>\n            public static void SignOut(this IExternalSignIn operations, string authenticationType = default(string))\n            {\n                operations.SignOutAsync(authenticationType).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='authenticationType'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task SignOutAsync(this IExternalSignIn operations, string authenticationType = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.SignOutWithHttpMessagesAsync(authenticationType, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='returnUrl'>\n            /// </param>\n            public static void SignInCallback(this IExternalSignIn operations, string returnUrl = default(string))\n            {\n                operations.SignInCallbackAsync(returnUrl).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='returnUrl'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task SignInCallbackAsync(this IExternalSignIn operations, string returnUrl = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.SignInCallbackWithHttpMessagesAsync(returnUrl, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static IList<ExternalSignInProviderInfo> GetExternalLoginProviders(this IExternalSignIn operations)\n            {\n                return operations.GetExternalLoginProvidersAsync().GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<ExternalSignInProviderInfo>> GetExternalLoginProvidersAsync(this IExternalSignIn operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetExternalLoginProvidersWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Apps operations.\n    /// </summary>\n    public partial class Apps : IServiceOperations<PlatformModuleClient>, IApps\n    {\n        /// <summary>\n        /// Initializes a new instance of the Apps class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public Apps(PlatformModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the PlatformModuleClient\n        /// </summary>\n        public PlatformModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Gets the list of available apps, filtered by user permissions.\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<AppDescriptor>>> GetAppsWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetApps\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/apps\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<AppDescriptor>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<AppDescriptor>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Apps operations.\n    /// </summary>\n    public partial interface IApps\n    {\n        /// <summary>\n        /// Gets the list of available apps, filtered by user permissions.\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<AppDescriptor>>> GetAppsWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for Apps.\n    /// </summary>\n    public static partial class AppsExtensions\n    {\n            /// <summary>\n            /// Gets the list of available apps, filtered by user permissions.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static IList<AppDescriptor> GetApps(this IApps operations)\n            {\n                return operations.GetAppsAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Gets the list of available apps, filtered by user permissions.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<AppDescriptor>> GetAppsAsync(this IApps operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetAppsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// ChangeLog operations.\n    /// </summary>\n    public partial class ChangeLog : IServiceOperations<PlatformModuleClient>, IChangeLog\n    {\n        /// <summary>\n        /// Initializes a new instance of the ChangeLog class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public ChangeLog(PlatformModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the PlatformModuleClient\n        /// </summary>\n        public PlatformModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Force set changes last modified date\n        /// </summary>\n        /// <param name='scope'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> ForceChangesWithHttpMessagesAsync(string scope = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"scope\", scope);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ForceChanges\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/changes/force\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (scope != null)\n            {\n                _queryParameters.Add(string.Format(\"Scope={0}\", System.Uri.EscapeDataString(scope)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> ResetPlatformCacheWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ResetPlatformCache\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform-cache/reset\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get last modified date for given scope\n        /// Used for signal of what something changed and for cache invalidation in\n        /// external platform clients\n        /// </summary>\n        /// <param name='scope'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<LastModifiedResponse>> GetLastModifiedDateWithHttpMessagesAsync(string scope = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"scope\", scope);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetLastModifiedDate\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/changes/lastmodifieddate\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (scope != null)\n            {\n                _queryParameters.Add(string.Format(\"scope={0}\", System.Uri.EscapeDataString(scope)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<LastModifiedResponse>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<LastModifiedResponse>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ChangedEntitiesResponse>> GetChangedEntitiesWithHttpMessagesAsync(ChangedEntitiesRequest body = default(ChangedEntitiesRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetChangedEntities\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/changes/changed-entities\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ChangedEntitiesResponse>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ChangedEntitiesResponse>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> ResetChangedEntitiesWithHttpMessagesAsync(IList<string> body = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ResetChangedEntities\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/changes/changed-entities/reset\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ChangeLogSearchResult>> SearchChangesWithHttpMessagesAsync(ChangeLogSearchCriteria body = default(ChangeLogSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchChanges\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/changelog/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ChangeLogSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ChangeLogSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='type'>\n        /// </param>\n        /// <param name='start'>\n        /// </param>\n        /// <param name='end'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<OperationLog>>> SearchTypeChangeHistoryWithHttpMessagesAsync(string type, System.DateTime? start = default(System.DateTime?), System.DateTime? end = default(System.DateTime?), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (type == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"type\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"type\", type);\n                tracingParameters.Add(\"start\", start);\n                tracingParameters.Add(\"end\", end);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchTypeChangeHistory\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/changelog/{type}/changes\").ToString();\n            _url = _url.Replace(\"{type}\", System.Uri.EscapeDataString(type));\n            List<string> _queryParameters = new List<string>();\n            if (start != null)\n            {\n                _queryParameters.Add(string.Format(\"start={0}\", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(start, Client.SerializationSettings).Trim('\"'))));\n            }\n            if (end != null)\n            {\n                _queryParameters.Add(string.Format(\"end={0}\", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(end, Client.SerializationSettings).Trim('\"'))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<OperationLog>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<OperationLog>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// ChangeLog operations.\n    /// </summary>\n    public partial interface IChangeLog\n    {\n        /// <summary>\n        /// Force set changes last modified date\n        /// </summary>\n        /// <param name='scope'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> ForceChangesWithHttpMessagesAsync(string scope = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> ResetPlatformCacheWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get last modified date for given scope\n        /// Used for signal of what something changed and for cache\n        /// invalidation in external platform clients\n        /// </summary>\n        /// <param name='scope'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<LastModifiedResponse>> GetLastModifiedDateWithHttpMessagesAsync(string scope = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<ChangedEntitiesResponse>> GetChangedEntitiesWithHttpMessagesAsync(ChangedEntitiesRequest body = default(ChangedEntitiesRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> ResetChangedEntitiesWithHttpMessagesAsync(IList<string> body = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<ChangeLogSearchResult>> SearchChangesWithHttpMessagesAsync(ChangeLogSearchCriteria body = default(ChangeLogSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='type'>\n        /// </param>\n        /// <param name='start'>\n        /// </param>\n        /// <param name='end'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<IList<OperationLog>>> SearchTypeChangeHistoryWithHttpMessagesAsync(string type, System.DateTime? start = default(System.DateTime?), System.DateTime? end = default(System.DateTime?), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for ChangeLog.\n    /// </summary>\n    public static partial class ChangeLogExtensions\n    {\n            /// <summary>\n            /// Force set changes last modified date\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='scope'>\n            /// </param>\n            public static void ForceChanges(this IChangeLog operations, string scope = default(string))\n            {\n                operations.ForceChangesAsync(scope).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Force set changes last modified date\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='scope'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task ForceChangesAsync(this IChangeLog operations, string scope = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.ForceChangesWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static void ResetPlatformCache(this IChangeLog operations)\n            {\n                operations.ResetPlatformCacheAsync().GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task ResetPlatformCacheAsync(this IChangeLog operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.ResetPlatformCacheWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Get last modified date for given scope\n            /// Used for signal of what something changed and for cache invalidation in\n            /// external platform clients\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='scope'>\n            /// </param>\n            public static LastModifiedResponse GetLastModifiedDate(this IChangeLog operations, string scope = default(string))\n            {\n                return operations.GetLastModifiedDateAsync(scope).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get last modified date for given scope\n            /// Used for signal of what something changed and for cache invalidation in\n            /// external platform clients\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='scope'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<LastModifiedResponse> GetLastModifiedDateAsync(this IChangeLog operations, string scope = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetLastModifiedDateWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static ChangedEntitiesResponse GetChangedEntities(this IChangeLog operations, ChangedEntitiesRequest body = default(ChangedEntitiesRequest))\n            {\n                return operations.GetChangedEntitiesAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ChangedEntitiesResponse> GetChangedEntitiesAsync(this IChangeLog operations, ChangedEntitiesRequest body = default(ChangedEntitiesRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetChangedEntitiesWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void ResetChangedEntities(this IChangeLog operations, IList<string> body = default(IList<string>))\n            {\n                operations.ResetChangedEntitiesAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task ResetChangedEntitiesAsync(this IChangeLog operations, IList<string> body = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.ResetChangedEntitiesWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static ChangeLogSearchResult SearchChanges(this IChangeLog operations, ChangeLogSearchCriteria body = default(ChangeLogSearchCriteria))\n            {\n                return operations.SearchChangesAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ChangeLogSearchResult> SearchChangesAsync(this IChangeLog operations, ChangeLogSearchCriteria body = default(ChangeLogSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchChangesWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='type'>\n            /// </param>\n            /// <param name='start'>\n            /// </param>\n            /// <param name='end'>\n            /// </param>\n            public static IList<OperationLog> SearchTypeChangeHistory(this IChangeLog operations, string type, System.DateTime? start = default(System.DateTime?), System.DateTime? end = default(System.DateTime?))\n            {\n                return operations.SearchTypeChangeHistoryAsync(type, start, end).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='type'>\n            /// </param>\n            /// <param name='start'>\n            /// </param>\n            /// <param name='end'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<OperationLog>> SearchTypeChangeHistoryAsync(this IChangeLog operations, string type, System.DateTime? start = default(System.DateTime?), System.DateTime? end = default(System.DateTime?), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchTypeChangeHistoryWithHttpMessagesAsync(type, start, end, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Diagnostics operations.\n    /// </summary>\n    public partial class Diagnostics : IServiceOperations<PlatformModuleClient>, IDiagnostics\n    {\n        /// <summary>\n        /// Initializes a new instance of the Diagnostics class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public Diagnostics(PlatformModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the PlatformModuleClient\n        /// </summary>\n        public PlatformModuleClient Client { get; private set; }\n\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SystemInfo>> GetSystemInfoWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetSystemInfo\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/diagnostics/systeminfo\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SystemInfo>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SystemInfo>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get installed modules with errors\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<ModuleDescriptor>>> GetModulesErrorsWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetModulesErrors\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/diagnostics/errors\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<ModuleDescriptor>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<ModuleDescriptor>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Diagnostics operations.\n    /// </summary>\n    public partial interface IDiagnostics\n    {\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<SystemInfo>> GetSystemInfoWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get installed modules with errors\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<ModuleDescriptor>>> GetModulesErrorsWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for Diagnostics.\n    /// </summary>\n    public static partial class DiagnosticsExtensions\n    {\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static SystemInfo GetSystemInfo(this IDiagnostics operations)\n            {\n                return operations.GetSystemInfoAsync().GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SystemInfo> GetSystemInfoAsync(this IDiagnostics operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetSystemInfoWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get installed modules with errors\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static IList<ModuleDescriptor> GetModulesErrors(this IDiagnostics operations)\n            {\n                return operations.GetModulesErrorsAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get installed modules with errors\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<ModuleDescriptor>> GetModulesErrorsAsync(this IDiagnostics operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetModulesErrorsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// DynamicProperties operations.\n    /// </summary>\n    public partial class DynamicProperties : IServiceOperations<PlatformModuleClient>, IDynamicProperties\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicProperties class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public DynamicProperties(PlatformModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the PlatformModuleClient\n        /// </summary>\n        public PlatformModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Get object types which support dynamic properties\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<string>>> GetObjectTypesWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetObjectTypes\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/dynamic/types\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<string>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<string>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get dynamic properties registered for object type\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<DynamicPropertySearchResult>> SearchDynamicPropertiesWithHttpMessagesAsync(DynamicPropertySearchCriteria body = default(DynamicPropertySearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchDynamicProperties\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/dynamic/properties/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<DynamicPropertySearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<DynamicPropertySearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Add new dynamic property\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<DynamicProperty>> CreatePropertyAsyncWithHttpMessagesAsync(DynamicProperty body = default(DynamicProperty), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CreatePropertyAsync\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/dynamic/properties\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<DynamicProperty>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<DynamicProperty>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Update existing dynamic property\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UpdatePropertyAsyncWithHttpMessagesAsync(DynamicProperty body = default(DynamicProperty), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdatePropertyAsync\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/dynamic/properties\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Delete dynamic property\n        /// </summary>\n        /// <param name='propertyIds'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeletePropertyAsyncWithHttpMessagesAsync(IList<string> propertyIds = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"propertyIds\", propertyIds);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeletePropertyAsync\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/dynamic/properties\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (propertyIds != null)\n            {\n                _queryParameters.Add(string.Format(\"propertyIds={0}\", System.Uri.EscapeDataString(string.Join(\",\", propertyIds))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Does nothing. Just a way to expose DynamicObjectProperty thru Swagger.\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<DynamicObjectProperty>> ExposeDynamicObjectPropertyWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ExposeDynamicObjectProperty\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/dynamic\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<DynamicObjectProperty>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<DynamicObjectProperty>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get dictionary items\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<DynamicPropertyDictionaryItemSearchResult>> SearchDictionaryItemsWithHttpMessagesAsync(DynamicPropertyDictionaryItemSearchCriteria body = default(DynamicPropertyDictionaryItemSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchDictionaryItems\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/dynamic/dictionaryitems/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<DynamicPropertyDictionaryItemSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<DynamicPropertyDictionaryItemSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Add or update dictionary items\n        /// </summary>\n        /// <remarks>\n        /// Fill item ID to update existing item or leave it empty to create a new\n        /// item.\n        /// </remarks>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> SaveDictionaryItemsAsyncWithHttpMessagesAsync(IList<DynamicPropertyDictionaryItem> body = default(IList<DynamicPropertyDictionaryItem>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SaveDictionaryItemsAsync\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/dynamic/dictionaryitems\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Delete dictionary items\n        /// </summary>\n        /// <param name='ids'>\n        /// IDs of dictionary items to delete.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteDictionaryItemAsyncWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteDictionaryItemAsync\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/dynamic/dictionaryitems\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Join(\",\", ids))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// DynamicProperties operations.\n    /// </summary>\n    public partial interface IDynamicProperties\n    {\n        /// <summary>\n        /// Get object types which support dynamic properties\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<string>>> GetObjectTypesWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get dynamic properties registered for object type\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<DynamicPropertySearchResult>> SearchDynamicPropertiesWithHttpMessagesAsync(DynamicPropertySearchCriteria body = default(DynamicPropertySearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Add new dynamic property\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<DynamicProperty>> CreatePropertyAsyncWithHttpMessagesAsync(DynamicProperty body = default(DynamicProperty), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Update existing dynamic property\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> UpdatePropertyAsyncWithHttpMessagesAsync(DynamicProperty body = default(DynamicProperty), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Delete dynamic property\n        /// </summary>\n        /// <param name='propertyIds'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeletePropertyAsyncWithHttpMessagesAsync(IList<string> propertyIds = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Does nothing. Just a way to expose DynamicObjectProperty thru\n        /// Swagger.\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<DynamicObjectProperty>> ExposeDynamicObjectPropertyWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get dictionary items\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<DynamicPropertyDictionaryItemSearchResult>> SearchDictionaryItemsWithHttpMessagesAsync(DynamicPropertyDictionaryItemSearchCriteria body = default(DynamicPropertyDictionaryItemSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Add or update dictionary items\n        /// </summary>\n        /// <remarks>\n        /// Fill item ID to update existing item or leave it empty to create a\n        /// new item.\n        /// </remarks>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> SaveDictionaryItemsAsyncWithHttpMessagesAsync(IList<DynamicPropertyDictionaryItem> body = default(IList<DynamicPropertyDictionaryItem>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Delete dictionary items\n        /// </summary>\n        /// <param name='ids'>\n        /// IDs of dictionary items to delete.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeleteDictionaryItemAsyncWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for DynamicProperties.\n    /// </summary>\n    public static partial class DynamicPropertiesExtensions\n    {\n            /// <summary>\n            /// Get object types which support dynamic properties\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static IList<string> GetObjectTypes(this IDynamicProperties operations)\n            {\n                return operations.GetObjectTypesAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get object types which support dynamic properties\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<string>> GetObjectTypesAsync(this IDynamicProperties operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetObjectTypesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get dynamic properties registered for object type\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static DynamicPropertySearchResult SearchDynamicProperties(this IDynamicProperties operations, DynamicPropertySearchCriteria body = default(DynamicPropertySearchCriteria))\n            {\n                return operations.SearchDynamicPropertiesAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get dynamic properties registered for object type\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<DynamicPropertySearchResult> SearchDynamicPropertiesAsync(this IDynamicProperties operations, DynamicPropertySearchCriteria body = default(DynamicPropertySearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchDynamicPropertiesWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Add new dynamic property\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static DynamicProperty CreatePropertyAsync(this IDynamicProperties operations, DynamicProperty body = default(DynamicProperty))\n            {\n                return operations.CreatePropertyAsyncAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Add new dynamic property\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<DynamicProperty> CreatePropertyAsyncAsync(this IDynamicProperties operations, DynamicProperty body = default(DynamicProperty), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.CreatePropertyAsyncWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Update existing dynamic property\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void UpdatePropertyAsync(this IDynamicProperties operations, DynamicProperty body = default(DynamicProperty))\n            {\n                operations.UpdatePropertyAsyncAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Update existing dynamic property\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UpdatePropertyAsyncAsync(this IDynamicProperties operations, DynamicProperty body = default(DynamicProperty), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UpdatePropertyAsyncWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Delete dynamic property\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='propertyIds'>\n            /// </param>\n            public static void DeletePropertyAsync(this IDynamicProperties operations, IList<string> propertyIds = default(IList<string>))\n            {\n                operations.DeletePropertyAsyncAsync(propertyIds).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Delete dynamic property\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='propertyIds'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeletePropertyAsyncAsync(this IDynamicProperties operations, IList<string> propertyIds = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeletePropertyAsyncWithHttpMessagesAsync(propertyIds, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Does nothing. Just a way to expose DynamicObjectProperty thru Swagger.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static DynamicObjectProperty ExposeDynamicObjectProperty(this IDynamicProperties operations)\n            {\n                return operations.ExposeDynamicObjectPropertyAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Does nothing. Just a way to expose DynamicObjectProperty thru Swagger.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<DynamicObjectProperty> ExposeDynamicObjectPropertyAsync(this IDynamicProperties operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.ExposeDynamicObjectPropertyWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get dictionary items\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static DynamicPropertyDictionaryItemSearchResult SearchDictionaryItems(this IDynamicProperties operations, DynamicPropertyDictionaryItemSearchCriteria body = default(DynamicPropertyDictionaryItemSearchCriteria))\n            {\n                return operations.SearchDictionaryItemsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get dictionary items\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<DynamicPropertyDictionaryItemSearchResult> SearchDictionaryItemsAsync(this IDynamicProperties operations, DynamicPropertyDictionaryItemSearchCriteria body = default(DynamicPropertyDictionaryItemSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchDictionaryItemsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Add or update dictionary items\n            /// </summary>\n            /// <remarks>\n            /// Fill item ID to update existing item or leave it empty to create a new\n            /// item.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void SaveDictionaryItemsAsync(this IDynamicProperties operations, IList<DynamicPropertyDictionaryItem> body = default(IList<DynamicPropertyDictionaryItem>))\n            {\n                operations.SaveDictionaryItemsAsyncAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Add or update dictionary items\n            /// </summary>\n            /// <remarks>\n            /// Fill item ID to update existing item or leave it empty to create a new\n            /// item.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task SaveDictionaryItemsAsyncAsync(this IDynamicProperties operations, IList<DynamicPropertyDictionaryItem> body = default(IList<DynamicPropertyDictionaryItem>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.SaveDictionaryItemsAsyncWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Delete dictionary items\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// IDs of dictionary items to delete.\n            /// </param>\n            public static void DeleteDictionaryItemAsync(this IDynamicProperties operations, IList<string> ids = default(IList<string>))\n            {\n                operations.DeleteDictionaryItemAsyncAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Delete dictionary items\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// IDs of dictionary items to delete.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteDictionaryItemAsyncAsync(this IDynamicProperties operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteDictionaryItemAsyncWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Jobs operations.\n    /// </summary>\n    public partial class Jobs : IServiceOperations<PlatformModuleClient>, IJobs\n    {\n        /// <summary>\n        /// Initializes a new instance of the Jobs class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public Jobs(PlatformModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the PlatformModuleClient\n        /// </summary>\n        public PlatformModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Get background job status\n        /// </summary>\n        /// <param name='id'>\n        /// Job ID.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Job>> GetStatusWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetStatus\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/jobs/{id}\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Job>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Job>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Jobs operations.\n    /// </summary>\n    public partial interface IJobs\n    {\n        /// <summary>\n        /// Get background job status\n        /// </summary>\n        /// <param name='id'>\n        /// Job ID.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Job>> GetStatusWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for Jobs.\n    /// </summary>\n    public static partial class JobsExtensions\n    {\n            /// <summary>\n            /// Get background job status\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Job ID.\n            /// </param>\n            public static Job GetStatus(this IJobs operations, string id)\n            {\n                return operations.GetStatusAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get background job status\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Job ID.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Job> GetStatusAsync(this IJobs operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetStatusWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Modules operations.\n    /// </summary>\n    public partial class Modules : IServiceOperations<PlatformModuleClient>, IModules\n    {\n        /// <summary>\n        /// Initializes a new instance of the Modules class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public Modules(PlatformModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the PlatformModuleClient\n        /// </summary>\n        public PlatformModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Reload  modules\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> ReloadModulesWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ReloadModules\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/modules/reload\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get installed modules\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<ModuleDescriptor>>> GetModulesWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetModules\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/modules\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<ModuleDescriptor>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<ModuleDescriptor>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get all dependent modules for module\n        /// </summary>\n        /// <param name='body'>\n        /// modules descriptors\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<ModuleDescriptor>>> GetDependingModulesWithHttpMessagesAsync(IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetDependingModules\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/modules/getdependents\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<ModuleDescriptor>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<ModuleDescriptor>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Returns a flat expanded  list of modules that depend on passed modules\n        /// </summary>\n        /// <param name='body'>\n        /// modules descriptors\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<ModuleDescriptor>>> GetMissingDependenciesWithHttpMessagesAsync(IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetMissingDependencies\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/modules/getmissingdependencies\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<ModuleDescriptor>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<ModuleDescriptor>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Upload module package for installation or update\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ModuleDescriptor>> UploadModuleArchiveWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UploadModuleArchive\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/modules/localstorage\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ModuleDescriptor>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ModuleDescriptor>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Install modules\n        /// </summary>\n        /// <param name='body'>\n        /// modules for install\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ModulePushNotification>> InstallModulesWithHttpMessagesAsync(IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"InstallModules\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/modules/install\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ModulePushNotification>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ModulePushNotification>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Uninstall module\n        /// </summary>\n        /// <param name='body'>\n        /// modules\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ModulePushNotification>> UninstallModuleWithHttpMessagesAsync(IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UninstallModule\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/modules/uninstall\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ModulePushNotification>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ModulePushNotification>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Restart web application\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> RestartWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"Restart\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/modules/restart\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Auto-install modules with specified groups\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ModuleAutoInstallPushNotification>> TryToAutoInstallModulesWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"TryToAutoInstallModules\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/modules/autoinstall\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ModuleAutoInstallPushNotification>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ModuleAutoInstallPushNotification>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Modules operations.\n    /// </summary>\n    public partial interface IModules\n    {\n        /// <summary>\n        /// Reload  modules\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> ReloadModulesWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get installed modules\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<ModuleDescriptor>>> GetModulesWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get all dependent modules for module\n        /// </summary>\n        /// <param name='body'>\n        /// modules descriptors\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<ModuleDescriptor>>> GetDependingModulesWithHttpMessagesAsync(IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Returns a flat expanded  list of modules that depend on passed\n        /// modules\n        /// </summary>\n        /// <param name='body'>\n        /// modules descriptors\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<ModuleDescriptor>>> GetMissingDependenciesWithHttpMessagesAsync(IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Upload module package for installation or update\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<ModuleDescriptor>> UploadModuleArchiveWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Install modules\n        /// </summary>\n        /// <param name='body'>\n        /// modules for install\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<ModulePushNotification>> InstallModulesWithHttpMessagesAsync(IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Uninstall module\n        /// </summary>\n        /// <param name='body'>\n        /// modules\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<ModulePushNotification>> UninstallModuleWithHttpMessagesAsync(IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Restart web application\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> RestartWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Auto-install modules with specified groups\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<ModuleAutoInstallPushNotification>> TryToAutoInstallModulesWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for Modules.\n    /// </summary>\n    public static partial class ModulesExtensions\n    {\n            /// <summary>\n            /// Reload  modules\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static void ReloadModules(this IModules operations)\n            {\n                operations.ReloadModulesAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Reload  modules\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task ReloadModulesAsync(this IModules operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.ReloadModulesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Get installed modules\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static IList<ModuleDescriptor> GetModules(this IModules operations)\n            {\n                return operations.GetModulesAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get installed modules\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<ModuleDescriptor>> GetModulesAsync(this IModules operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetModulesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get all dependent modules for module\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// modules descriptors\n            /// </param>\n            public static IList<ModuleDescriptor> GetDependingModules(this IModules operations, IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>))\n            {\n                return operations.GetDependingModulesAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get all dependent modules for module\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// modules descriptors\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<ModuleDescriptor>> GetDependingModulesAsync(this IModules operations, IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetDependingModulesWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Returns a flat expanded  list of modules that depend on passed modules\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// modules descriptors\n            /// </param>\n            public static IList<ModuleDescriptor> GetMissingDependencies(this IModules operations, IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>))\n            {\n                return operations.GetMissingDependenciesAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Returns a flat expanded  list of modules that depend on passed modules\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// modules descriptors\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<ModuleDescriptor>> GetMissingDependenciesAsync(this IModules operations, IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetMissingDependenciesWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Upload module package for installation or update\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static ModuleDescriptor UploadModuleArchive(this IModules operations)\n            {\n                return operations.UploadModuleArchiveAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Upload module package for installation or update\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ModuleDescriptor> UploadModuleArchiveAsync(this IModules operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.UploadModuleArchiveWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Install modules\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// modules for install\n            /// </param>\n            public static ModulePushNotification InstallModules(this IModules operations, IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>))\n            {\n                return operations.InstallModulesAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Install modules\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// modules for install\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ModulePushNotification> InstallModulesAsync(this IModules operations, IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.InstallModulesWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Uninstall module\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// modules\n            /// </param>\n            public static ModulePushNotification UninstallModule(this IModules operations, IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>))\n            {\n                return operations.UninstallModuleAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Uninstall module\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// modules\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ModulePushNotification> UninstallModuleAsync(this IModules operations, IList<ModuleDescriptor> body = default(IList<ModuleDescriptor>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.UninstallModuleWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Restart web application\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static void Restart(this IModules operations)\n            {\n                operations.RestartAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Restart web application\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task RestartAsync(this IModules operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.RestartWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Auto-install modules with specified groups\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static ModuleAutoInstallPushNotification TryToAutoInstallModules(this IModules operations)\n            {\n                return operations.TryToAutoInstallModulesAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Auto-install modules with specified groups\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ModuleAutoInstallPushNotification> TryToAutoInstallModulesAsync(this IModules operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.TryToAutoInstallModulesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// OAuthApps operations.\n    /// </summary>\n    public partial class OAuthApps : IServiceOperations<PlatformModuleClient>, IOAuthApps\n    {\n        /// <summary>\n        /// Initializes a new instance of the OAuthApps class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public OAuthApps(PlatformModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the PlatformModuleClient\n        /// </summary>\n        public PlatformModuleClient Client { get; private set; }\n\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<OpenIddictApplicationDescriptor>> NewOperationWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"NewOperation\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/oauthapps/new\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<OpenIddictApplicationDescriptor>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<OpenIddictApplicationDescriptor>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<OpenIddictApplicationDescriptor>> SaveAsyncWithHttpMessagesAsync(OpenIddictApplicationDescriptor body = default(OpenIddictApplicationDescriptor), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SaveAsync\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/oauthapps\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<OpenIddictApplicationDescriptor>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<OpenIddictApplicationDescriptor>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='clientIds'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteAsyncWithHttpMessagesAsync(IList<string> clientIds = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"clientIds\", clientIds);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteAsync\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/oauthapps\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (clientIds != null)\n            {\n                _queryParameters.Add(string.Format(\"clientIds={0}\", System.Uri.EscapeDataString(string.Join(\",\", clientIds))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<OAuthAppSearchResult>> SearchAsyncWithHttpMessagesAsync(OAuthAppSearchCriteria body = default(OAuthAppSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchAsync\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/oauthapps/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<OAuthAppSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<OAuthAppSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// OAuthApps operations.\n    /// </summary>\n    public partial interface IOAuthApps\n    {\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<OpenIddictApplicationDescriptor>> NewOperationWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<OpenIddictApplicationDescriptor>> SaveAsyncWithHttpMessagesAsync(OpenIddictApplicationDescriptor body = default(OpenIddictApplicationDescriptor), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='clientIds'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeleteAsyncWithHttpMessagesAsync(IList<string> clientIds = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<OAuthAppSearchResult>> SearchAsyncWithHttpMessagesAsync(OAuthAppSearchCriteria body = default(OAuthAppSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for OAuthApps.\n    /// </summary>\n    public static partial class OAuthAppsExtensions\n    {\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static OpenIddictApplicationDescriptor NewOperation(this IOAuthApps operations)\n            {\n                return operations.NewOperationAsync().GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<OpenIddictApplicationDescriptor> NewOperationAsync(this IOAuthApps operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.NewOperationWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static OpenIddictApplicationDescriptor SaveAsync(this IOAuthApps operations, OpenIddictApplicationDescriptor body = default(OpenIddictApplicationDescriptor))\n            {\n                return operations.SaveAsyncAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<OpenIddictApplicationDescriptor> SaveAsyncAsync(this IOAuthApps operations, OpenIddictApplicationDescriptor body = default(OpenIddictApplicationDescriptor), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SaveAsyncWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='clientIds'>\n            /// </param>\n            public static void DeleteAsync(this IOAuthApps operations, IList<string> clientIds = default(IList<string>))\n            {\n                operations.DeleteAsyncAsync(clientIds).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='clientIds'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteAsyncAsync(this IOAuthApps operations, IList<string> clientIds = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteAsyncWithHttpMessagesAsync(clientIds, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static OAuthAppSearchResult SearchAsync(this IOAuthApps operations, OAuthAppSearchCriteria body = default(OAuthAppSearchCriteria))\n            {\n                return operations.SearchAsyncAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<OAuthAppSearchResult> SearchAsyncAsync(this IOAuthApps operations, OAuthAppSearchCriteria body = default(OAuthAppSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchAsyncWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// PushNotificationOperations operations.\n    /// </summary>\n    public partial class PushNotificationOperations : IServiceOperations<PlatformModuleClient>, IPushNotificationOperations\n    {\n        /// <summary>\n        /// Initializes a new instance of the PushNotificationOperations class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public PushNotificationOperations(PlatformModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the PlatformModuleClient\n        /// </summary>\n        public PlatformModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// SearchAsync push notifications\n        /// </summary>\n        /// <param name='body'>\n        /// SearchAsync parameters.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<PushNotificationSearchResult>> SearchPushNotificationWithHttpMessagesAsync(PushNotificationSearchCriteria body = default(PushNotificationSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchPushNotification\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/pushnotifications\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<PushNotificationSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<PushNotificationSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Mark all notifications as read\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<PushNotificationSearchResult>> MarkAllAsReadWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"MarkAllAsRead\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/pushnotifications/markAllAsRead\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<PushNotificationSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<PushNotificationSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// PushNotificationOperations operations.\n    /// </summary>\n    public partial interface IPushNotificationOperations\n    {\n        /// <summary>\n        /// SearchAsync push notifications\n        /// </summary>\n        /// <param name='body'>\n        /// SearchAsync parameters.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<PushNotificationSearchResult>> SearchPushNotificationWithHttpMessagesAsync(PushNotificationSearchCriteria body = default(PushNotificationSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Mark all notifications as read\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<PushNotificationSearchResult>> MarkAllAsReadWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for PushNotificationOperations.\n    /// </summary>\n    public static partial class PushNotificationOperationsExtensions\n    {\n            /// <summary>\n            /// SearchAsync push notifications\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// SearchAsync parameters.\n            /// </param>\n            public static PushNotificationSearchResult SearchPushNotification(this IPushNotificationOperations operations, PushNotificationSearchCriteria body = default(PushNotificationSearchCriteria))\n            {\n                return operations.SearchPushNotificationAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// SearchAsync push notifications\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// SearchAsync parameters.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<PushNotificationSearchResult> SearchPushNotificationAsync(this IPushNotificationOperations operations, PushNotificationSearchCriteria body = default(PushNotificationSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchPushNotificationWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Mark all notifications as read\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static PushNotificationSearchResult MarkAllAsRead(this IPushNotificationOperations operations)\n            {\n                return operations.MarkAllAsReadAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Mark all notifications as read\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<PushNotificationSearchResult> MarkAllAsReadAsync(this IPushNotificationOperations operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.MarkAllAsReadWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Security operations.\n    /// </summary>\n    public partial class Security : IServiceOperations<PlatformModuleClient>, ISecurity\n    {\n        /// <summary>\n        /// Initializes a new instance of the Security class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public Security(PlatformModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the PlatformModuleClient\n        /// </summary>\n        public PlatformModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Sign in with user name and password\n        /// </summary>\n        /// <remarks>\n        /// Verifies provided credentials and if succeeded returns full user details,\n        /// otherwise returns 401 Unauthorized.\n        /// </remarks>\n        /// <param name='body'>\n        /// Login request.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SignInResult>> LoginWithHttpMessagesAsync(LoginRequest body = default(LoginRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"Login\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/login\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SignInResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SignInResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Sign out\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> LogoutWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"Logout\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/logout\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get current user details\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<UserDetail>> GetCurrentUserWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetCurrentUser\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/currentuser\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<UserDetail>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<UserDetail>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Claim>>> UserinfoWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"Userinfo\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/userinfo\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Claim>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Claim>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get all registered permissions\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Permission>>> GetAllRegisteredPermissionsWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetAllRegisteredPermissions\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/permissions\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Permission>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Permission>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// SearchAsync roles by keyword\n        /// </summary>\n        /// <param name='body'>\n        /// SearchAsync parameters.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<RoleSearchResult>> SearchRolesWithHttpMessagesAsync(RoleSearchCriteria body = default(RoleSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchRoles\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/roles/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<RoleSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<RoleSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get role by ID\n        /// </summary>\n        /// <param name='roleName'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Role>> GetRoleWithHttpMessagesAsync(string roleName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (roleName == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"roleName\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"roleName\", roleName);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetRole\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/roles/{roleName}\").ToString();\n            _url = _url.Replace(\"{roleName}\", System.Uri.EscapeDataString(roleName));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Role>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Role>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Delete roles by ID\n        /// </summary>\n        /// <param name='ids'>\n        /// An array of role IDs.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteRolesWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteRoles\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/roles\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Join(\",\", ids))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Update an existing role or create new\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SecurityResult>> UpdateRoleWithHttpMessagesAsync(Role body = default(Role), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdateRole\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/roles\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SecurityResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SecurityResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// SearchAsync users by keyword\n        /// </summary>\n        /// <param name='body'>\n        /// Search criteria.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<UserSearchResult>> SearchUsersWithHttpMessagesAsync(UserSearchCriteria body = default(UserSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchUsers\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<UserSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<UserSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get user details by user name\n        /// </summary>\n        /// <param name='userName'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ApplicationUser>> GetUserByNameWithHttpMessagesAsync(string userName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (userName == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"userName\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"userName\", userName);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetUserByName\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{userName}\").ToString();\n            _url = _url.Replace(\"{userName}\", System.Uri.EscapeDataString(userName));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ApplicationUser>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ApplicationUser>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get user details by user ID\n        /// </summary>\n        /// <param name='id'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ApplicationUser>> GetUserByIdWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetUserById\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/id/{id}\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ApplicationUser>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ApplicationUser>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get user details by user email\n        /// </summary>\n        /// <param name='email'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ApplicationUser>> GetUserByEmailWithHttpMessagesAsync(string email, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (email == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"email\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"email\", email);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetUserByEmail\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/email/{email}\").ToString();\n            _url = _url.Replace(\"{email}\", System.Uri.EscapeDataString(email));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ApplicationUser>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ApplicationUser>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get user details by external login provider\n        /// </summary>\n        /// <param name='loginProvider'>\n        /// </param>\n        /// <param name='providerKey'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ApplicationUser>> GetUserByLoginWithHttpMessagesAsync(string loginProvider, string providerKey, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (loginProvider == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"loginProvider\");\n            }\n            if (providerKey == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"providerKey\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"loginProvider\", loginProvider);\n                tracingParameters.Add(\"providerKey\", providerKey);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetUserByLogin\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/login/external/{loginProvider}/{providerKey}\").ToString();\n            _url = _url.Replace(\"{loginProvider}\", System.Uri.EscapeDataString(loginProvider));\n            _url = _url.Replace(\"{providerKey}\", System.Uri.EscapeDataString(providerKey));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ApplicationUser>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ApplicationUser>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Create new user\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SecurityResult>> CreateWithHttpMessagesAsync(ApplicationUser body = default(ApplicationUser), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"Create\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/create\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SecurityResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SecurityResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Change password for current user.\n        /// </summary>\n        /// <param name='body'>\n        /// Old and new passwords.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SecurityResult>> ChangeCurrentUserPasswordWithHttpMessagesAsync(ChangePasswordRequest body = default(ChangePasswordRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ChangeCurrentUserPassword\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/currentuser/changepassword\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 400 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SecurityResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SecurityResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Change password\n        /// </summary>\n        /// <param name='userName'>\n        /// user name\n        /// </param>\n        /// <param name='body'>\n        /// Old and new passwords.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SecurityResult>> ChangePasswordWithHttpMessagesAsync(string userName, ChangePasswordRequest body = default(ChangePasswordRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (userName == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"userName\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"userName\", userName);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ChangePassword\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{userName}/changepassword\").ToString();\n            _url = _url.Replace(\"{userName}\", System.Uri.EscapeDataString(userName));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 400 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SecurityResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SecurityResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Reset password confirmation\n        /// </summary>\n        /// <param name='userName'>\n        /// </param>\n        /// <param name='body'>\n        /// Password reset information containing new password.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SecurityResult>> ResetPasswordWithHttpMessagesAsync(string userName, ResetPasswordConfirmRequest body = default(ResetPasswordConfirmRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (userName == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"userName\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"userName\", userName);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ResetPassword\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{userName}/resetpassword\").ToString();\n            _url = _url.Replace(\"{userName}\", System.Uri.EscapeDataString(userName));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SecurityResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SecurityResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Reset password confirmation\n        /// </summary>\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='body'>\n        /// New password.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SecurityResult>> ResetPasswordByTokenWithHttpMessagesAsync(string userId, ResetPasswordConfirmRequest body = default(ResetPasswordConfirmRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (userId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"userId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"userId\", userId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ResetPasswordByToken\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{userId}/resetpasswordconfirm\").ToString();\n            _url = _url.Replace(\"{userId}\", System.Uri.EscapeDataString(userId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SecurityResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SecurityResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Validate password reset token\n        /// </summary>\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<bool?>> ValidatePasswordResetTokenWithHttpMessagesAsync(string userId, ValidatePasswordResetTokenRequest body = default(ValidatePasswordResetTokenRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (userId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"userId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"userId\", userId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ValidatePasswordResetToken\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{userId}/validatepasswordresettoken\").ToString();\n            _url = _url.Replace(\"{userId}\", System.Uri.EscapeDataString(userId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<bool?>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<bool?>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Send email with instructions on how to reset user password.\n        /// </summary>\n        /// <remarks>\n        /// Verifies provided userName and (if succeeded) sends email.\n        /// </remarks>\n        /// <param name='loginOrEmail'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> RequestPasswordResetWithHttpMessagesAsync(string loginOrEmail, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (loginOrEmail == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"loginOrEmail\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"loginOrEmail\", loginOrEmail);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"RequestPasswordReset\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{loginOrEmail}/requestpasswordreset\").ToString();\n            _url = _url.Replace(\"{loginOrEmail}\", System.Uri.EscapeDataString(loginOrEmail));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IdentityResult>> ValidatePasswordWithHttpMessagesAsync(string body = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ValidatePassword\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/validatepassword\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IdentityResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IdentityResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IdentityResult>> ValidateUserPasswordWithHttpMessagesAsync(ChangePasswordRequest body = default(ChangePasswordRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ValidateUserPassword\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/validateuserpassword\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IdentityResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IdentityResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Update user details by user ID\n        /// </summary>\n        /// <param name='body'>\n        /// User details.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SecurityResult>> UpdateWithHttpMessagesAsync(ApplicationUser body = default(ApplicationUser), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"Update\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SecurityResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SecurityResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Delete users by name\n        /// </summary>\n        /// <param name='names'>\n        /// An array of user names.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteWithHttpMessagesAsync(IList<string> names = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"names\", names);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"Delete\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (names != null)\n            {\n                _queryParameters.Add(string.Format(\"names={0}\", System.Uri.EscapeDataString(string.Join(\",\", names))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Checks if user locked\n        /// </summary>\n        /// <param name='id'>\n        /// User id\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<UserLockedResult>> IsUserLockedWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"IsUserLocked\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{id}/locked\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<UserLockedResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<UserLockedResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Checks if manual password change is enabled\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<UserLockedResult>> PasswordChangeEnabledWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"PasswordChangeEnabled\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/passwordchangeenabled\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<UserLockedResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<UserLockedResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Lock user\n        /// </summary>\n        /// <param name='id'>\n        /// &gt;User id\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SecurityResult>> LockUserWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"LockUser\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{id}/lock\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SecurityResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SecurityResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Unlock user\n        /// </summary>\n        /// <param name='id'>\n        /// &gt;User id\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SecurityResult>> UnlockUserWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UnlockUser\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{id}/unlock\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SecurityResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SecurityResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='id'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<UserApiKey>>> GetUserApiKeysWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetUserApiKeys\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{id}/apikeys\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<UserApiKey>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<UserApiKey>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<UserApiKey>>> SaveUserApiKeyWithHttpMessagesAsync(UserApiKey body = default(UserApiKey), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SaveUserApiKey\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/apikeys\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<UserApiKey>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<UserApiKey>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<UserApiKey>>> UpdateUserApiKeyWithHttpMessagesAsync(UserApiKey body = default(UserApiKey), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdateUserApiKey\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/apikeys\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<UserApiKey>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<UserApiKey>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='ids'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<UserApiKey>>> DeleteUserApiKeysWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteUserApiKeys\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/apikeys\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Join(\",\", ids))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<UserApiKey>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<UserApiKey>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get allowed login types\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<LoginType>>> GetLoginTypesWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetLoginTypes\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/logintypes\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<LoginType>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<LoginType>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Verify user email\n        /// </summary>\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> SendVerificationEmailWithHttpMessagesAsync(string userId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (userId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"userId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"userId\", userId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SendVerificationEmail\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{userId}/sendVerificationEmail\").ToString();\n            _url = _url.Replace(\"{userId}\", System.Uri.EscapeDataString(userId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SecurityResult>> ConfirmEmailWithHttpMessagesAsync(string userId, ConfirmEmailRequest body = default(ConfirmEmailRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (userId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"userId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"userId\", userId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"ConfirmEmail\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{userId}/confirmEmail\").ToString();\n            _url = _url.Replace(\"{userId}\", System.Uri.EscapeDataString(userId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SecurityResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SecurityResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='newEmail'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<string>> GenerateChangeEmailTokenWithHttpMessagesAsync(string userId, string newEmail = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (userId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"userId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"userId\", userId);\n                tracingParameters.Add(\"newEmail\", newEmail);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GenerateChangeEmailToken\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{userId}/generateChangeEmailToken\").ToString();\n            _url = _url.Replace(\"{userId}\", System.Uri.EscapeDataString(userId));\n            List<string> _queryParameters = new List<string>();\n            if (newEmail != null)\n            {\n                _queryParameters.Add(string.Format(\"newEmail={0}\", System.Uri.EscapeDataString(newEmail)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<string>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<string>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<string>> GenerateEmailConfirmationTokenWithHttpMessagesAsync(string userId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (userId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"userId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"userId\", userId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GenerateEmailConfirmationToken\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{userId}/generateEmailConfirmationToken\").ToString();\n            _url = _url.Replace(\"{userId}\", System.Uri.EscapeDataString(userId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<string>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<string>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<string>> GeneratePasswordResetTokenWithHttpMessagesAsync(string userId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (userId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"userId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"userId\", userId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GeneratePasswordResetToken\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{userId}/generatePasswordResetToken\").ToString();\n            _url = _url.Replace(\"{userId}\", System.Uri.EscapeDataString(userId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<string>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<string>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='tokenProvider'>\n        /// </param>\n        /// <param name='purpose'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<string>> GenerateUserTokenWithHttpMessagesAsync(string userId, string tokenProvider = default(string), string purpose = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (userId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"userId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"userId\", userId);\n                tracingParameters.Add(\"tokenProvider\", tokenProvider);\n                tracingParameters.Add(\"purpose\", purpose);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GenerateUserToken\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{userId}/generateToken\").ToString();\n            _url = _url.Replace(\"{userId}\", System.Uri.EscapeDataString(userId));\n            List<string> _queryParameters = new List<string>();\n            if (tokenProvider != null)\n            {\n                _queryParameters.Add(string.Format(\"tokenProvider={0}\", System.Uri.EscapeDataString(tokenProvider)));\n            }\n            if (purpose != null)\n            {\n                _queryParameters.Add(string.Format(\"purpose={0}\", System.Uri.EscapeDataString(purpose)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<string>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<string>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<bool?>> VerifyUserTokenWithHttpMessagesAsync(string userId, VerifyTokenRequest body = default(VerifyTokenRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (userId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"userId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"userId\", userId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"VerifyUserToken\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/security/users/{userId}/verifyToken\").ToString();\n            _url = _url.Replace(\"{userId}\", System.Uri.EscapeDataString(userId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<bool?>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<bool?>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Security operations.\n    /// </summary>\n    public partial interface ISecurity\n    {\n        /// <summary>\n        /// Sign in with user name and password\n        /// </summary>\n        /// <remarks>\n        /// Verifies provided credentials and if succeeded returns full user\n        /// details, otherwise returns 401 Unauthorized.\n        /// </remarks>\n        /// <param name='body'>\n        /// Login request.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<SignInResult>> LoginWithHttpMessagesAsync(LoginRequest body = default(LoginRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Sign out\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> LogoutWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get current user details\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<UserDetail>> GetCurrentUserWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Claim>>> UserinfoWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get all registered permissions\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Permission>>> GetAllRegisteredPermissionsWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// SearchAsync roles by keyword\n        /// </summary>\n        /// <param name='body'>\n        /// SearchAsync parameters.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<RoleSearchResult>> SearchRolesWithHttpMessagesAsync(RoleSearchCriteria body = default(RoleSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get role by ID\n        /// </summary>\n        /// <param name='roleName'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Role>> GetRoleWithHttpMessagesAsync(string roleName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Delete roles by ID\n        /// </summary>\n        /// <param name='ids'>\n        /// An array of role IDs.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeleteRolesWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Update an existing role or create new\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<SecurityResult>> UpdateRoleWithHttpMessagesAsync(Role body = default(Role), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// SearchAsync users by keyword\n        /// </summary>\n        /// <param name='body'>\n        /// Search criteria.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<UserSearchResult>> SearchUsersWithHttpMessagesAsync(UserSearchCriteria body = default(UserSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get user details by user name\n        /// </summary>\n        /// <param name='userName'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<ApplicationUser>> GetUserByNameWithHttpMessagesAsync(string userName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get user details by user ID\n        /// </summary>\n        /// <param name='id'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<ApplicationUser>> GetUserByIdWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get user details by user email\n        /// </summary>\n        /// <param name='email'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<ApplicationUser>> GetUserByEmailWithHttpMessagesAsync(string email, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get user details by external login provider\n        /// </summary>\n        /// <param name='loginProvider'>\n        /// </param>\n        /// <param name='providerKey'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<ApplicationUser>> GetUserByLoginWithHttpMessagesAsync(string loginProvider, string providerKey, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Create new user\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<SecurityResult>> CreateWithHttpMessagesAsync(ApplicationUser body = default(ApplicationUser), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Change password for current user.\n        /// </summary>\n        /// <param name='body'>\n        /// Old and new passwords.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<SecurityResult>> ChangeCurrentUserPasswordWithHttpMessagesAsync(ChangePasswordRequest body = default(ChangePasswordRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Change password\n        /// </summary>\n        /// <param name='userName'>\n        /// user name\n        /// </param>\n        /// <param name='body'>\n        /// Old and new passwords.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<SecurityResult>> ChangePasswordWithHttpMessagesAsync(string userName, ChangePasswordRequest body = default(ChangePasswordRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Reset password confirmation\n        /// </summary>\n        /// <param name='userName'>\n        /// </param>\n        /// <param name='body'>\n        /// Password reset information containing new password.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<SecurityResult>> ResetPasswordWithHttpMessagesAsync(string userName, ResetPasswordConfirmRequest body = default(ResetPasswordConfirmRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Reset password confirmation\n        /// </summary>\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='body'>\n        /// New password.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<SecurityResult>> ResetPasswordByTokenWithHttpMessagesAsync(string userId, ResetPasswordConfirmRequest body = default(ResetPasswordConfirmRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Validate password reset token\n        /// </summary>\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<bool?>> ValidatePasswordResetTokenWithHttpMessagesAsync(string userId, ValidatePasswordResetTokenRequest body = default(ValidatePasswordResetTokenRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Send email with instructions on how to reset user password.\n        /// </summary>\n        /// <remarks>\n        /// Verifies provided userName and (if succeeded) sends email.\n        /// </remarks>\n        /// <param name='loginOrEmail'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse> RequestPasswordResetWithHttpMessagesAsync(string loginOrEmail, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IdentityResult>> ValidatePasswordWithHttpMessagesAsync(string body = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IdentityResult>> ValidateUserPasswordWithHttpMessagesAsync(ChangePasswordRequest body = default(ChangePasswordRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Update user details by user ID\n        /// </summary>\n        /// <param name='body'>\n        /// User details.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<SecurityResult>> UpdateWithHttpMessagesAsync(ApplicationUser body = default(ApplicationUser), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Delete users by name\n        /// </summary>\n        /// <param name='names'>\n        /// An array of user names.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeleteWithHttpMessagesAsync(IList<string> names = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Checks if user locked\n        /// </summary>\n        /// <param name='id'>\n        /// User id\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<UserLockedResult>> IsUserLockedWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Checks if manual password change is enabled\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<UserLockedResult>> PasswordChangeEnabledWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Lock user\n        /// </summary>\n        /// <param name='id'>\n        /// &gt;User id\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<SecurityResult>> LockUserWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Unlock user\n        /// </summary>\n        /// <param name='id'>\n        /// &gt;User id\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<SecurityResult>> UnlockUserWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='id'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<IList<UserApiKey>>> GetUserApiKeysWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<UserApiKey>>> SaveUserApiKeyWithHttpMessagesAsync(UserApiKey body = default(UserApiKey), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<UserApiKey>>> UpdateUserApiKeyWithHttpMessagesAsync(UserApiKey body = default(UserApiKey), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='ids'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<UserApiKey>>> DeleteUserApiKeysWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get allowed login types\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<LoginType>>> GetLoginTypesWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Verify user email\n        /// </summary>\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse> SendVerificationEmailWithHttpMessagesAsync(string userId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<SecurityResult>> ConfirmEmailWithHttpMessagesAsync(string userId, ConfirmEmailRequest body = default(ConfirmEmailRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='newEmail'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<string>> GenerateChangeEmailTokenWithHttpMessagesAsync(string userId, string newEmail = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<string>> GenerateEmailConfirmationTokenWithHttpMessagesAsync(string userId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<string>> GeneratePasswordResetTokenWithHttpMessagesAsync(string userId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='tokenProvider'>\n        /// </param>\n        /// <param name='purpose'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<string>> GenerateUserTokenWithHttpMessagesAsync(string userId, string tokenProvider = default(string), string purpose = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<bool?>> VerifyUserTokenWithHttpMessagesAsync(string userId, VerifyTokenRequest body = default(VerifyTokenRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for Security.\n    /// </summary>\n    public static partial class SecurityExtensions\n    {\n            /// <summary>\n            /// Sign in with user name and password\n            /// </summary>\n            /// <remarks>\n            /// Verifies provided credentials and if succeeded returns full user details,\n            /// otherwise returns 401 Unauthorized.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Login request.\n            /// </param>\n            public static SignInResult Login(this ISecurity operations, LoginRequest body = default(LoginRequest))\n            {\n                return operations.LoginAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Sign in with user name and password\n            /// </summary>\n            /// <remarks>\n            /// Verifies provided credentials and if succeeded returns full user details,\n            /// otherwise returns 401 Unauthorized.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Login request.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SignInResult> LoginAsync(this ISecurity operations, LoginRequest body = default(LoginRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.LoginWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Sign out\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static void Logout(this ISecurity operations)\n            {\n                operations.LogoutAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Sign out\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task LogoutAsync(this ISecurity operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.LogoutWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Get current user details\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static UserDetail GetCurrentUser(this ISecurity operations)\n            {\n                return operations.GetCurrentUserAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get current user details\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<UserDetail> GetCurrentUserAsync(this ISecurity operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetCurrentUserWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static IList<Claim> Userinfo(this ISecurity operations)\n            {\n                return operations.UserinfoAsync().GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Claim>> UserinfoAsync(this ISecurity operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.UserinfoWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get all registered permissions\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static IList<Permission> GetAllRegisteredPermissions(this ISecurity operations)\n            {\n                return operations.GetAllRegisteredPermissionsAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get all registered permissions\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Permission>> GetAllRegisteredPermissionsAsync(this ISecurity operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetAllRegisteredPermissionsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// SearchAsync roles by keyword\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// SearchAsync parameters.\n            /// </param>\n            public static RoleSearchResult SearchRoles(this ISecurity operations, RoleSearchCriteria body = default(RoleSearchCriteria))\n            {\n                return operations.SearchRolesAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// SearchAsync roles by keyword\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// SearchAsync parameters.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<RoleSearchResult> SearchRolesAsync(this ISecurity operations, RoleSearchCriteria body = default(RoleSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchRolesWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get role by ID\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='roleName'>\n            /// </param>\n            public static Role GetRole(this ISecurity operations, string roleName)\n            {\n                return operations.GetRoleAsync(roleName).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get role by ID\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='roleName'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Role> GetRoleAsync(this ISecurity operations, string roleName, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetRoleWithHttpMessagesAsync(roleName, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Delete roles by ID\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// An array of role IDs.\n            /// </param>\n            public static void DeleteRoles(this ISecurity operations, IList<string> ids = default(IList<string>))\n            {\n                operations.DeleteRolesAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Delete roles by ID\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// An array of role IDs.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteRolesAsync(this ISecurity operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteRolesWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Update an existing role or create new\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static SecurityResult UpdateRole(this ISecurity operations, Role body = default(Role))\n            {\n                return operations.UpdateRoleAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Update an existing role or create new\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SecurityResult> UpdateRoleAsync(this ISecurity operations, Role body = default(Role), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.UpdateRoleWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// SearchAsync users by keyword\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Search criteria.\n            /// </param>\n            public static UserSearchResult SearchUsers(this ISecurity operations, UserSearchCriteria body = default(UserSearchCriteria))\n            {\n                return operations.SearchUsersAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// SearchAsync users by keyword\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Search criteria.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<UserSearchResult> SearchUsersAsync(this ISecurity operations, UserSearchCriteria body = default(UserSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchUsersWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get user details by user name\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userName'>\n            /// </param>\n            public static ApplicationUser GetUserByName(this ISecurity operations, string userName)\n            {\n                return operations.GetUserByNameAsync(userName).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get user details by user name\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userName'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ApplicationUser> GetUserByNameAsync(this ISecurity operations, string userName, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetUserByNameWithHttpMessagesAsync(userName, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get user details by user ID\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// </param>\n            public static ApplicationUser GetUserById(this ISecurity operations, string id)\n            {\n                return operations.GetUserByIdAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get user details by user ID\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ApplicationUser> GetUserByIdAsync(this ISecurity operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetUserByIdWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get user details by user email\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='email'>\n            /// </param>\n            public static ApplicationUser GetUserByEmail(this ISecurity operations, string email)\n            {\n                return operations.GetUserByEmailAsync(email).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get user details by user email\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='email'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ApplicationUser> GetUserByEmailAsync(this ISecurity operations, string email, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetUserByEmailWithHttpMessagesAsync(email, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get user details by external login provider\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='loginProvider'>\n            /// </param>\n            /// <param name='providerKey'>\n            /// </param>\n            public static ApplicationUser GetUserByLogin(this ISecurity operations, string loginProvider, string providerKey)\n            {\n                return operations.GetUserByLoginAsync(loginProvider, providerKey).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get user details by external login provider\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='loginProvider'>\n            /// </param>\n            /// <param name='providerKey'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ApplicationUser> GetUserByLoginAsync(this ISecurity operations, string loginProvider, string providerKey, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetUserByLoginWithHttpMessagesAsync(loginProvider, providerKey, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Create new user\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static SecurityResult Create(this ISecurity operations, ApplicationUser body = default(ApplicationUser))\n            {\n                return operations.CreateAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Create new user\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SecurityResult> CreateAsync(this ISecurity operations, ApplicationUser body = default(ApplicationUser), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.CreateWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Change password for current user.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Old and new passwords.\n            /// </param>\n            public static SecurityResult ChangeCurrentUserPassword(this ISecurity operations, ChangePasswordRequest body = default(ChangePasswordRequest))\n            {\n                return operations.ChangeCurrentUserPasswordAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Change password for current user.\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Old and new passwords.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SecurityResult> ChangeCurrentUserPasswordAsync(this ISecurity operations, ChangePasswordRequest body = default(ChangePasswordRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.ChangeCurrentUserPasswordWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Change password\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userName'>\n            /// user name\n            /// </param>\n            /// <param name='body'>\n            /// Old and new passwords.\n            /// </param>\n            public static SecurityResult ChangePassword(this ISecurity operations, string userName, ChangePasswordRequest body = default(ChangePasswordRequest))\n            {\n                return operations.ChangePasswordAsync(userName, body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Change password\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userName'>\n            /// user name\n            /// </param>\n            /// <param name='body'>\n            /// Old and new passwords.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SecurityResult> ChangePasswordAsync(this ISecurity operations, string userName, ChangePasswordRequest body = default(ChangePasswordRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.ChangePasswordWithHttpMessagesAsync(userName, body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Reset password confirmation\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userName'>\n            /// </param>\n            /// <param name='body'>\n            /// Password reset information containing new password.\n            /// </param>\n            public static SecurityResult ResetPassword(this ISecurity operations, string userName, ResetPasswordConfirmRequest body = default(ResetPasswordConfirmRequest))\n            {\n                return operations.ResetPasswordAsync(userName, body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Reset password confirmation\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userName'>\n            /// </param>\n            /// <param name='body'>\n            /// Password reset information containing new password.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SecurityResult> ResetPasswordAsync(this ISecurity operations, string userName, ResetPasswordConfirmRequest body = default(ResetPasswordConfirmRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.ResetPasswordWithHttpMessagesAsync(userName, body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Reset password confirmation\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='body'>\n            /// New password.\n            /// </param>\n            public static SecurityResult ResetPasswordByToken(this ISecurity operations, string userId, ResetPasswordConfirmRequest body = default(ResetPasswordConfirmRequest))\n            {\n                return operations.ResetPasswordByTokenAsync(userId, body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Reset password confirmation\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='body'>\n            /// New password.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SecurityResult> ResetPasswordByTokenAsync(this ISecurity operations, string userId, ResetPasswordConfirmRequest body = default(ResetPasswordConfirmRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.ResetPasswordByTokenWithHttpMessagesAsync(userId, body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Validate password reset token\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static bool? ValidatePasswordResetToken(this ISecurity operations, string userId, ValidatePasswordResetTokenRequest body = default(ValidatePasswordResetTokenRequest))\n            {\n                return operations.ValidatePasswordResetTokenAsync(userId, body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Validate password reset token\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<bool?> ValidatePasswordResetTokenAsync(this ISecurity operations, string userId, ValidatePasswordResetTokenRequest body = default(ValidatePasswordResetTokenRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.ValidatePasswordResetTokenWithHttpMessagesAsync(userId, body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Send email with instructions on how to reset user password.\n            /// </summary>\n            /// <remarks>\n            /// Verifies provided userName and (if succeeded) sends email.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='loginOrEmail'>\n            /// </param>\n            public static void RequestPasswordReset(this ISecurity operations, string loginOrEmail)\n            {\n                operations.RequestPasswordResetAsync(loginOrEmail).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Send email with instructions on how to reset user password.\n            /// </summary>\n            /// <remarks>\n            /// Verifies provided userName and (if succeeded) sends email.\n            /// </remarks>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='loginOrEmail'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task RequestPasswordResetAsync(this ISecurity operations, string loginOrEmail, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.RequestPasswordResetWithHttpMessagesAsync(loginOrEmail, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static IdentityResult ValidatePassword(this ISecurity operations, string body = default(string))\n            {\n                return operations.ValidatePasswordAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IdentityResult> ValidatePasswordAsync(this ISecurity operations, string body = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.ValidatePasswordWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static IdentityResult ValidateUserPassword(this ISecurity operations, ChangePasswordRequest body = default(ChangePasswordRequest))\n            {\n                return operations.ValidateUserPasswordAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IdentityResult> ValidateUserPasswordAsync(this ISecurity operations, ChangePasswordRequest body = default(ChangePasswordRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.ValidateUserPasswordWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Update user details by user ID\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// User details.\n            /// </param>\n            public static SecurityResult Update(this ISecurity operations, ApplicationUser body = default(ApplicationUser))\n            {\n                return operations.UpdateAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Update user details by user ID\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// User details.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SecurityResult> UpdateAsync(this ISecurity operations, ApplicationUser body = default(ApplicationUser), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.UpdateWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Delete users by name\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='names'>\n            /// An array of user names.\n            /// </param>\n            public static void Delete(this ISecurity operations, IList<string> names = default(IList<string>))\n            {\n                operations.DeleteAsync(names).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Delete users by name\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='names'>\n            /// An array of user names.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteAsync(this ISecurity operations, IList<string> names = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteWithHttpMessagesAsync(names, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Checks if user locked\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// User id\n            /// </param>\n            public static UserLockedResult IsUserLocked(this ISecurity operations, string id)\n            {\n                return operations.IsUserLockedAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Checks if user locked\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// User id\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<UserLockedResult> IsUserLockedAsync(this ISecurity operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.IsUserLockedWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Checks if manual password change is enabled\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static UserLockedResult PasswordChangeEnabled(this ISecurity operations)\n            {\n                return operations.PasswordChangeEnabledAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Checks if manual password change is enabled\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<UserLockedResult> PasswordChangeEnabledAsync(this ISecurity operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.PasswordChangeEnabledWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Lock user\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// &gt;User id\n            /// </param>\n            public static SecurityResult LockUser(this ISecurity operations, string id)\n            {\n                return operations.LockUserAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Lock user\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// &gt;User id\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SecurityResult> LockUserAsync(this ISecurity operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.LockUserWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Unlock user\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// &gt;User id\n            /// </param>\n            public static SecurityResult UnlockUser(this ISecurity operations, string id)\n            {\n                return operations.UnlockUserAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Unlock user\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// &gt;User id\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SecurityResult> UnlockUserAsync(this ISecurity operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.UnlockUserWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// </param>\n            public static IList<UserApiKey> GetUserApiKeys(this ISecurity operations, string id)\n            {\n                return operations.GetUserApiKeysAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<UserApiKey>> GetUserApiKeysAsync(this ISecurity operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetUserApiKeysWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static IList<UserApiKey> SaveUserApiKey(this ISecurity operations, UserApiKey body = default(UserApiKey))\n            {\n                return operations.SaveUserApiKeyAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<UserApiKey>> SaveUserApiKeyAsync(this ISecurity operations, UserApiKey body = default(UserApiKey), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SaveUserApiKeyWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static IList<UserApiKey> UpdateUserApiKey(this ISecurity operations, UserApiKey body = default(UserApiKey))\n            {\n                return operations.UpdateUserApiKeyAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<UserApiKey>> UpdateUserApiKeyAsync(this ISecurity operations, UserApiKey body = default(UserApiKey), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.UpdateUserApiKeyWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// </param>\n            public static IList<UserApiKey> DeleteUserApiKeys(this ISecurity operations, IList<string> ids = default(IList<string>))\n            {\n                return operations.DeleteUserApiKeysAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<UserApiKey>> DeleteUserApiKeysAsync(this ISecurity operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.DeleteUserApiKeysWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get allowed login types\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static IList<LoginType> GetLoginTypes(this ISecurity operations)\n            {\n                return operations.GetLoginTypesAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get allowed login types\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<LoginType>> GetLoginTypesAsync(this ISecurity operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetLoginTypesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Verify user email\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            public static void SendVerificationEmail(this ISecurity operations, string userId)\n            {\n                operations.SendVerificationEmailAsync(userId).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Verify user email\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task SendVerificationEmailAsync(this ISecurity operations, string userId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.SendVerificationEmailWithHttpMessagesAsync(userId, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static SecurityResult ConfirmEmail(this ISecurity operations, string userId, ConfirmEmailRequest body = default(ConfirmEmailRequest))\n            {\n                return operations.ConfirmEmailAsync(userId, body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SecurityResult> ConfirmEmailAsync(this ISecurity operations, string userId, ConfirmEmailRequest body = default(ConfirmEmailRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.ConfirmEmailWithHttpMessagesAsync(userId, body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='newEmail'>\n            /// </param>\n            public static string GenerateChangeEmailToken(this ISecurity operations, string userId, string newEmail = default(string))\n            {\n                return operations.GenerateChangeEmailTokenAsync(userId, newEmail).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='newEmail'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<string> GenerateChangeEmailTokenAsync(this ISecurity operations, string userId, string newEmail = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GenerateChangeEmailTokenWithHttpMessagesAsync(userId, newEmail, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            public static string GenerateEmailConfirmationToken(this ISecurity operations, string userId)\n            {\n                return operations.GenerateEmailConfirmationTokenAsync(userId).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<string> GenerateEmailConfirmationTokenAsync(this ISecurity operations, string userId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GenerateEmailConfirmationTokenWithHttpMessagesAsync(userId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            public static string GeneratePasswordResetToken(this ISecurity operations, string userId)\n            {\n                return operations.GeneratePasswordResetTokenAsync(userId).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<string> GeneratePasswordResetTokenAsync(this ISecurity operations, string userId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GeneratePasswordResetTokenWithHttpMessagesAsync(userId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='tokenProvider'>\n            /// </param>\n            /// <param name='purpose'>\n            /// </param>\n            public static string GenerateUserToken(this ISecurity operations, string userId, string tokenProvider = default(string), string purpose = default(string))\n            {\n                return operations.GenerateUserTokenAsync(userId, tokenProvider, purpose).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='tokenProvider'>\n            /// </param>\n            /// <param name='purpose'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<string> GenerateUserTokenAsync(this ISecurity operations, string userId, string tokenProvider = default(string), string purpose = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GenerateUserTokenWithHttpMessagesAsync(userId, tokenProvider, purpose, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static bool? VerifyUserToken(this ISecurity operations, string userId, VerifyTokenRequest body = default(VerifyTokenRequest))\n            {\n                return operations.VerifyUserTokenAsync(userId, body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<bool?> VerifyUserTokenAsync(this ISecurity operations, string userId, VerifyTokenRequest body = default(VerifyTokenRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.VerifyUserTokenWithHttpMessagesAsync(userId, body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Setting operations.\n    /// </summary>\n    public partial class Setting : IServiceOperations<PlatformModuleClient>, ISetting\n    {\n        /// <summary>\n        /// Initializes a new instance of the Setting class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public Setting(PlatformModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the PlatformModuleClient\n        /// </summary>\n        public PlatformModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Get all settings\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ObjectSettingEntry>> GetAllGlobalSettingsWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetAllGlobalSettings\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/settings\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ObjectSettingEntry>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ObjectSettingEntry>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Update settings values\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UpdateAsyncWithHttpMessagesAsync(IList<ObjectSettingEntry> body = default(IList<ObjectSettingEntry>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdateAsync\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/settings\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get settings registered by specific module\n        /// </summary>\n        /// <param name='id'>\n        /// Module ID.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<ObjectSettingEntry>>> GetGlobalModuleSettingsAsyncWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetGlobalModuleSettingsAsync\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/settings/modules/{id}\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<ObjectSettingEntry>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<ObjectSettingEntry>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get setting details by name\n        /// </summary>\n        /// <param name='name'>\n        /// Setting system name.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ObjectSettingEntry>> GetGlobalSettingAsyncWithHttpMessagesAsync(string name, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (name == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"name\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"name\", name);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetGlobalSettingAsync\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/settings/{name}\").ToString();\n            _url = _url.Replace(\"{name}\", System.Uri.EscapeDataString(name));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ObjectSettingEntry>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ObjectSettingEntry>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get UI customization setting\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<ObjectSettingEntry>> GetUICustomizationSettingWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetUICustomizationSetting\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/platform/settings/ui/customization\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<ObjectSettingEntry>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<ObjectSettingEntry>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Setting operations.\n    /// </summary>\n    public partial interface ISetting\n    {\n        /// <summary>\n        /// Get all settings\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<ObjectSettingEntry>> GetAllGlobalSettingsWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Update settings values\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> UpdateAsyncWithHttpMessagesAsync(IList<ObjectSettingEntry> body = default(IList<ObjectSettingEntry>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get settings registered by specific module\n        /// </summary>\n        /// <param name='id'>\n        /// Module ID.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<IList<ObjectSettingEntry>>> GetGlobalModuleSettingsAsyncWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get setting details by name\n        /// </summary>\n        /// <param name='name'>\n        /// Setting system name.\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<ObjectSettingEntry>> GetGlobalSettingAsyncWithHttpMessagesAsync(string name, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get UI customization setting\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<ObjectSettingEntry>> GetUICustomizationSettingWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for Setting.\n    /// </summary>\n    public static partial class SettingExtensions\n    {\n            /// <summary>\n            /// Get all settings\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static ObjectSettingEntry GetAllGlobalSettings(this ISetting operations)\n            {\n                return operations.GetAllGlobalSettingsAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get all settings\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ObjectSettingEntry> GetAllGlobalSettingsAsync(this ISetting operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetAllGlobalSettingsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Update settings values\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void UpdateAsync(this ISetting operations, IList<ObjectSettingEntry> body = default(IList<ObjectSettingEntry>))\n            {\n                operations.UpdateAsyncAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Update settings values\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UpdateAsyncAsync(this ISetting operations, IList<ObjectSettingEntry> body = default(IList<ObjectSettingEntry>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UpdateAsyncWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Get settings registered by specific module\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Module ID.\n            /// </param>\n            public static IList<ObjectSettingEntry> GetGlobalModuleSettingsAsync(this ISetting operations, string id)\n            {\n                return operations.GetGlobalModuleSettingsAsyncAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get settings registered by specific module\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Module ID.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<ObjectSettingEntry>> GetGlobalModuleSettingsAsyncAsync(this ISetting operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetGlobalModuleSettingsAsyncWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get setting details by name\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='name'>\n            /// Setting system name.\n            /// </param>\n            public static ObjectSettingEntry GetGlobalSettingAsync(this ISetting operations, string name)\n            {\n                return operations.GetGlobalSettingAsyncAsync(name).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get setting details by name\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='name'>\n            /// Setting system name.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ObjectSettingEntry> GetGlobalSettingAsyncAsync(this ISetting operations, string name, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetGlobalSettingAsyncWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get UI customization setting\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static ObjectSettingEntry GetUICustomizationSetting(this ISetting operations)\n            {\n                return operations.GetUICustomizationSettingAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get UI customization setting\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<ObjectSettingEntry> GetUICustomizationSettingAsync(this ISetting operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetUICustomizationSettingWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Paths1gq0sd1connectTokenpostrequestbodycontentapplicationJsonPatchJsonschema\n    {\n        /// <summary>\n        /// Initializes a new instance of the\n        /// Paths1gq0sd1connectTokenpostrequestbodycontentapplicationJsonPatchJsonschema\n        /// class.\n        /// </summary>\n        public Paths1gq0sd1connectTokenpostrequestbodycontentapplicationJsonPatchJsonschema()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the\n        /// Paths1gq0sd1connectTokenpostrequestbodycontentapplicationJsonPatchJsonschema\n        /// class.\n        /// </summary>\n        public Paths1gq0sd1connectTokenpostrequestbodycontentapplicationJsonPatchJsonschema(string grantType, string scope = default(string), string username = default(string), string password = default(string))\n        {\n            GrantType = grantType;\n            Scope = scope;\n            Username = username;\n            Password = password;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"grant_type\")]\n        public string GrantType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"scope\")]\n        public string Scope { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"username\")]\n        public string Username { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"password\")]\n        public string Password { get; set; }\n\n        /// <summary>\n        /// Validate the object.\n        /// </summary>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown if validation fails\n        /// </exception>\n        public virtual void Validate()\n        {\n            if (GrantType == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"GrantType\");\n            }\n        }\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ExternalSignInProviderInfo\n    {\n        /// <summary>\n        /// Initializes a new instance of the ExternalSignInProviderInfo class.\n        /// </summary>\n        public ExternalSignInProviderInfo()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ExternalSignInProviderInfo class.\n        /// </summary>\n        public ExternalSignInProviderInfo(string authenticationType = default(string), string displayName = default(string))\n        {\n            AuthenticationType = authenticationType;\n            DisplayName = displayName;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"authenticationType\")]\n        public string AuthenticationType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayName\")]\n        public string DisplayName { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class AppDescriptor\n    {\n        /// <summary>\n        /// Initializes a new instance of the AppDescriptor class.\n        /// </summary>\n        public AppDescriptor()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the AppDescriptor class.\n        /// </summary>\n        public AppDescriptor(string title = default(string), string description = default(string), string iconUrl = default(string), string relativeUrl = default(string), string permission = default(string), string id = default(string))\n        {\n            Title = title;\n            Description = description;\n            IconUrl = iconUrl;\n            RelativeUrl = relativeUrl;\n            Permission = permission;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"title\")]\n        public string Title { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"iconUrl\")]\n        public string IconUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"relativeUrl\")]\n        public string RelativeUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"permission\")]\n        public string Permission { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class OperationLog\n    {\n        /// <summary>\n        /// Initializes a new instance of the OperationLog class.\n        /// </summary>\n        public OperationLog()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the OperationLog class.\n        /// </summary>\n        /// <param name=\"operationType\">Possible values include: 'Detached',\n        /// 'Unchanged', 'Added', 'Deleted', 'Modified'</param>\n        public OperationLog(string objectType = default(string), string objectId = default(string), string operationType = default(string), string detail = default(string), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            ObjectType = objectType;\n            ObjectId = objectId;\n            OperationType = operationType;\n            Detail = detail;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Detached', 'Unchanged',\n        /// 'Added', 'Deleted', 'Modified'\n        /// </summary>\n        [JsonProperty(PropertyName = \"operationType\")]\n        public string OperationType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"detail\")]\n        public string Detail { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SemanticVersion\n    {\n        /// <summary>\n        /// Initializes a new instance of the SemanticVersion class.\n        /// </summary>\n        public SemanticVersion()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SemanticVersion class.\n        /// </summary>\n        /// <param name=\"major\">Major version X (X.y.z)</param>\n        /// <param name=\"minor\">Minor version Y (x.Y.z)</param>\n        /// <param name=\"patch\">Patch version Z (x.y.Z)</param>\n        public SemanticVersion(int? major = default(int?), int? minor = default(int?), int? patch = default(int?), string prerelease = default(string))\n        {\n            Major = major;\n            Minor = minor;\n            Patch = patch;\n            Prerelease = prerelease;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets major version X (X.y.z)\n        /// </summary>\n        [JsonProperty(PropertyName = \"major\")]\n        public int? Major { get; private set; }\n\n        /// <summary>\n        /// Gets minor version Y (x.Y.z)\n        /// </summary>\n        [JsonProperty(PropertyName = \"minor\")]\n        public int? Minor { get; private set; }\n\n        /// <summary>\n        /// Gets patch version Z (x.y.Z)\n        /// </summary>\n        [JsonProperty(PropertyName = \"patch\")]\n        public int? Patch { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"prerelease\")]\n        public string Prerelease { get; private set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ModuleIdentity\n    {\n        /// <summary>\n        /// Initializes a new instance of the ModuleIdentity class.\n        /// </summary>\n        public ModuleIdentity()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ModuleIdentity class.\n        /// </summary>\n        public ModuleIdentity(string id = default(string), SemanticVersion version = default(SemanticVersion))\n        {\n            Id = id;\n            Version = version;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"version\")]\n        public SemanticVersion Version { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ModuleDescriptor\n    {\n        /// <summary>\n        /// Initializes a new instance of the ModuleDescriptor class.\n        /// </summary>\n        public ModuleDescriptor()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ModuleDescriptor class.\n        /// </summary>\n        public ModuleDescriptor(string version = default(string), string platformVersion = default(string), string title = default(string), string description = default(string), IList<string> authors = default(IList<string>), IList<string> owners = default(IList<string>), string licenseUrl = default(string), string projectUrl = default(string), string iconUrl = default(string), bool? requireLicenseAcceptance = default(bool?), string releaseNotes = default(string), string copyright = default(string), string tags = default(string), IList<string> groups = default(IList<string>), IList<ModuleIdentity> dependencies = default(IList<ModuleIdentity>), IList<string> validationErrors = default(IList<string>), bool? isRemovable = default(bool?), bool? isInstalled = default(bool?), ModuleIdentity installedVersion = default(ModuleIdentity), string id = default(string))\n        {\n            Version = version;\n            PlatformVersion = platformVersion;\n            Title = title;\n            Description = description;\n            Authors = authors;\n            Owners = owners;\n            LicenseUrl = licenseUrl;\n            ProjectUrl = projectUrl;\n            IconUrl = iconUrl;\n            RequireLicenseAcceptance = requireLicenseAcceptance;\n            ReleaseNotes = releaseNotes;\n            Copyright = copyright;\n            Tags = tags;\n            Groups = groups;\n            Dependencies = dependencies;\n            ValidationErrors = validationErrors;\n            IsRemovable = isRemovable;\n            IsInstalled = isInstalled;\n            InstalledVersion = installedVersion;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"version\")]\n        public string Version { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"platformVersion\")]\n        public string PlatformVersion { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"title\")]\n        public string Title { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"authors\")]\n        public IList<string> Authors { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"owners\")]\n        public IList<string> Owners { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"licenseUrl\")]\n        public string LicenseUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"projectUrl\")]\n        public string ProjectUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"iconUrl\")]\n        public string IconUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"requireLicenseAcceptance\")]\n        public bool? RequireLicenseAcceptance { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"releaseNotes\")]\n        public string ReleaseNotes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"copyright\")]\n        public string Copyright { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"tags\")]\n        public string Tags { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"groups\")]\n        public IList<string> Groups { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"dependencies\")]\n        public IList<ModuleIdentity> Dependencies { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"validationErrors\")]\n        public IList<string> ValidationErrors { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isRemovable\")]\n        public bool? IsRemovable { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isInstalled\")]\n        public bool? IsInstalled { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"installedVersion\")]\n        public ModuleIdentity InstalledVersion { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicPropertyDictionaryItemName\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyDictionaryItemName\n        /// class.\n        /// </summary>\n        public DynamicPropertyDictionaryItemName()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyDictionaryItemName\n        /// class.\n        /// </summary>\n        /// <param name=\"locale\">Language ID, e.g. en-US.</param>\n        public DynamicPropertyDictionaryItemName(string locale = default(string), string name = default(string))\n        {\n            Locale = locale;\n            Name = name;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets language ID, e.g. en-US.\n        /// </summary>\n        [JsonProperty(PropertyName = \"locale\")]\n        public string Locale { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicPropertyDictionaryItem\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyDictionaryItem\n        /// class.\n        /// </summary>\n        public DynamicPropertyDictionaryItem()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyDictionaryItem\n        /// class.\n        /// </summary>\n        /// <param name=\"displayNames\">Item names for different\n        /// languages.</param>\n        public DynamicPropertyDictionaryItem(string propertyId = default(string), string name = default(string), IList<DynamicPropertyDictionaryItemName> displayNames = default(IList<DynamicPropertyDictionaryItemName>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            PropertyId = propertyId;\n            Name = name;\n            DisplayNames = displayNames;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyId\")]\n        public string PropertyId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Gets or sets item names for different languages.\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayNames\")]\n        public IList<DynamicPropertyDictionaryItemName> DisplayNames { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ClaimsIdentity\n    {\n        /// <summary>\n        /// Initializes a new instance of the ClaimsIdentity class.\n        /// </summary>\n        public ClaimsIdentity()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ClaimsIdentity class.\n        /// </summary>\n        public ClaimsIdentity(string authenticationType = default(string), bool? isAuthenticated = default(bool?), ClaimsIdentity actor = default(ClaimsIdentity), object bootstrapContext = default(object), IList<Claim> claims = default(IList<Claim>), string label = default(string), string name = default(string), string nameClaimType = default(string), string roleClaimType = default(string))\n        {\n            AuthenticationType = authenticationType;\n            IsAuthenticated = isAuthenticated;\n            Actor = actor;\n            BootstrapContext = bootstrapContext;\n            Claims = claims;\n            Label = label;\n            Name = name;\n            NameClaimType = nameClaimType;\n            RoleClaimType = roleClaimType;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"authenticationType\")]\n        public string AuthenticationType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isAuthenticated\")]\n        public bool? IsAuthenticated { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"actor\")]\n        public ClaimsIdentity Actor { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"bootstrapContext\")]\n        public object BootstrapContext { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"claims\")]\n        public IList<Claim> Claims { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"label\")]\n        public string Label { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"nameClaimType\")]\n        public string NameClaimType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"roleClaimType\")]\n        public string RoleClaimType { get; private set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Claim\n    {\n        /// <summary>\n        /// Initializes a new instance of the Claim class.\n        /// </summary>\n        public Claim()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Claim class.\n        /// </summary>\n        public Claim(string issuer = default(string), string originalIssuer = default(string), IDictionary<string, string> properties = default(IDictionary<string, string>), ClaimsIdentity subject = default(ClaimsIdentity), string type = default(string), string value = default(string), string valueType = default(string))\n        {\n            Issuer = issuer;\n            OriginalIssuer = originalIssuer;\n            Properties = properties;\n            Subject = subject;\n            Type = type;\n            Value = value;\n            ValueType = valueType;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"issuer\")]\n        public string Issuer { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"originalIssuer\")]\n        public string OriginalIssuer { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"properties\")]\n        public IDictionary<string, string> Properties { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"subject\")]\n        public ClaimsIdentity Subject { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"value\")]\n        public string Value { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueType\")]\n        public string ValueType { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class PermissionScope\n    {\n        /// <summary>\n        /// Initializes a new instance of the PermissionScope class.\n        /// </summary>\n        public PermissionScope()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PermissionScope class.\n        /// </summary>\n        /// <param name=\"type\">Scope type name</param>\n        /// <param name=\"label\">Display label for particular scope value used\n        /// only for  representation</param>\n        /// <param name=\"scope\">Represent string scope value</param>\n        public PermissionScope(string type = default(string), string label = default(string), string scope = default(string))\n        {\n            Type = type;\n            Label = label;\n            Scope = scope;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets scope type name\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n        /// <summary>\n        /// Gets or sets display label for particular scope value used only for\n        /// representation\n        /// </summary>\n        [JsonProperty(PropertyName = \"label\")]\n        public string Label { get; set; }\n\n        /// <summary>\n        /// Gets or sets represent string scope value\n        /// </summary>\n        [JsonProperty(PropertyName = \"scope\")]\n        public string Scope { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Permission\n    {\n        /// <summary>\n        /// Initializes a new instance of the Permission class.\n        /// </summary>\n        public Permission()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Permission class.\n        /// </summary>\n        /// <param name=\"moduleId\">Id of the module which has registered this\n        /// permission.</param>\n        /// <param name=\"groupName\">Display name of the group to which this\n        /// permission belongs. The '|' character is used to separate Child and\n        /// parent groups.</param>\n        public Permission(string id = default(string), string name = default(string), string moduleId = default(string), string groupName = default(string), IList<PermissionScope> assignedScopes = default(IList<PermissionScope>), IList<PermissionScope> availableScopes = default(IList<PermissionScope>))\n        {\n            Id = id;\n            Name = name;\n            ModuleId = moduleId;\n            GroupName = groupName;\n            AssignedScopes = assignedScopes;\n            AvailableScopes = availableScopes;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Gets or sets id of the module which has registered this permission.\n        /// </summary>\n        [JsonProperty(PropertyName = \"moduleId\")]\n        public string ModuleId { get; set; }\n\n        /// <summary>\n        /// Gets or sets display name of the group to which this permission\n        /// belongs. The '|' character is used to separate Child and parent\n        /// groups.\n        /// </summary>\n        [JsonProperty(PropertyName = \"groupName\")]\n        public string GroupName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"assignedScopes\")]\n        public IList<PermissionScope> AssignedScopes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"availableScopes\")]\n        public IList<PermissionScope> AvailableScopes { get; private set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class UserApiKey\n    {\n        /// <summary>\n        /// Initializes a new instance of the UserApiKey class.\n        /// </summary>\n        public UserApiKey()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the UserApiKey class.\n        /// </summary>\n        public UserApiKey(string apiKey = default(string), string userName = default(string), string userId = default(string), bool? isActive = default(bool?), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            ApiKey = apiKey;\n            UserName = userName;\n            UserId = userId;\n            IsActive = isActive;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"apiKey\")]\n        public string ApiKey { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"userName\")]\n        public string UserName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"userId\")]\n        public string UserId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isActive\")]\n        public bool? IsActive { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class LoginType\n    {\n        /// <summary>\n        /// Initializes a new instance of the LoginType class.\n        /// </summary>\n        public LoginType()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the LoginType class.\n        /// </summary>\n        public LoginType(bool? enabled = default(bool?), bool? hasLoginForm = default(bool?), string authenticationType = default(string), int? priority = default(int?))\n        {\n            Enabled = enabled;\n            HasLoginForm = hasLoginForm;\n            AuthenticationType = authenticationType;\n            Priority = priority;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"enabled\")]\n        public bool? Enabled { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"hasLoginForm\")]\n        public bool? HasLoginForm { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"authenticationType\")]\n        public string AuthenticationType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"priority\")]\n        public int? Priority { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ObjectSettingEntry\n    {\n        /// <summary>\n        /// Initializes a new instance of the ObjectSettingEntry class.\n        /// </summary>\n        public ObjectSettingEntry()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ObjectSettingEntry class.\n        /// </summary>\n        /// <param name=\"objectId\">Setting may belong to any object in\n        /// system</param>\n        /// <param name=\"isReadOnly\">Flag indicates the this setting is read\n        /// only and can't be changed</param>\n        /// <param name=\"restartRequired\">The flag indicates that you need to\n        /// restart the application to apply this setting changes.</param>\n        /// <param name=\"moduleId\">The module id which setting belong\n        /// to</param>\n        /// <param name=\"groupName\">Setting group name</param>\n        /// <param name=\"name\">Setting name</param>\n        /// <param name=\"displayName\">Display setting name</param>\n        /// <param name=\"isHidden\">Flag indicates that this setting doesn't\n        /// need to be displayed on the UI</param>\n        /// <param name=\"valueType\">Possible values include: 'ShortText',\n        /// 'LongText', 'Integer', 'Decimal', 'DateTime', 'Boolean',\n        /// 'SecureString', 'Json', 'PositiveInteger'</param>\n        /// <param name=\"isDictionary\">The flag indicates what current setting\n        /// is just editable dictionary and hasn't any concrete value</param>\n        public ObjectSettingEntry(bool? itHasValues = default(bool?), string objectId = default(string), string objectType = default(string), bool? isReadOnly = default(bool?), object value = default(object), string id = default(string), bool? restartRequired = default(bool?), string moduleId = default(string), string groupName = default(string), string name = default(string), string displayName = default(string), bool? isRequired = default(bool?), bool? isHidden = default(bool?), string valueType = default(string), IList<object> allowedValues = default(IList<object>), object defaultValue = default(object), bool? isDictionary = default(bool?))\n        {\n            ItHasValues = itHasValues;\n            ObjectId = objectId;\n            ObjectType = objectType;\n            IsReadOnly = isReadOnly;\n            Value = value;\n            Id = id;\n            RestartRequired = restartRequired;\n            ModuleId = moduleId;\n            GroupName = groupName;\n            Name = name;\n            DisplayName = displayName;\n            IsRequired = isRequired;\n            IsHidden = isHidden;\n            ValueType = valueType;\n            AllowedValues = allowedValues;\n            DefaultValue = defaultValue;\n            IsDictionary = isDictionary;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"itHasValues\")]\n        public bool? ItHasValues { get; private set; }\n\n        /// <summary>\n        /// Gets or sets setting may belong to any object in system\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// Gets or sets flag indicates the this setting is read only and can't\n        /// be changed\n        /// </summary>\n        [JsonProperty(PropertyName = \"isReadOnly\")]\n        public bool? IsReadOnly { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"value\")]\n        public object Value { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n        /// <summary>\n        /// Gets or sets the flag indicates that you need to restart the\n        /// application to apply this setting changes.\n        /// </summary>\n        [JsonProperty(PropertyName = \"restartRequired\")]\n        public bool? RestartRequired { get; set; }\n\n        /// <summary>\n        /// Gets or sets the module id which setting belong to\n        /// </summary>\n        [JsonProperty(PropertyName = \"moduleId\")]\n        public string ModuleId { get; set; }\n\n        /// <summary>\n        /// Gets or sets setting group name\n        /// </summary>\n        [JsonProperty(PropertyName = \"groupName\")]\n        public string GroupName { get; set; }\n\n        /// <summary>\n        /// Gets or sets setting name\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Gets or sets display setting name\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayName\")]\n        public string DisplayName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isRequired\")]\n        public bool? IsRequired { get; set; }\n\n        /// <summary>\n        /// Gets or sets flag indicates that this setting doesn't need to be\n        /// displayed on the UI\n        /// </summary>\n        [JsonProperty(PropertyName = \"isHidden\")]\n        public bool? IsHidden { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'ShortText', 'LongText',\n        /// 'Integer', 'Decimal', 'DateTime', 'Boolean', 'SecureString',\n        /// 'Json', 'PositiveInteger'\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueType\")]\n        public string ValueType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"allowedValues\")]\n        public IList<object> AllowedValues { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"defaultValue\")]\n        public object DefaultValue { get; set; }\n\n        /// <summary>\n        /// Gets or sets the flag indicates what current setting is just\n        /// editable dictionary and hasn't any concrete value\n        /// </summary>\n        [JsonProperty(PropertyName = \"isDictionary\")]\n        public bool? IsDictionary { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Role\n    {\n        /// <summary>\n        /// Initializes a new instance of the Role class.\n        /// </summary>\n        public Role()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Role class.\n        /// </summary>\n        public Role(string description = default(string), IList<Permission> permissions = default(IList<Permission>), string id = default(string), string name = default(string), string normalizedName = default(string), string concurrencyStamp = default(string))\n        {\n            Description = description;\n            Permissions = permissions;\n            Id = id;\n            Name = name;\n            NormalizedName = normalizedName;\n            ConcurrencyStamp = concurrencyStamp;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"permissions\")]\n        public IList<Permission> Permissions { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"normalizedName\")]\n        public string NormalizedName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"concurrencyStamp\")]\n        public string ConcurrencyStamp { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ApplicationUserLogin\n    {\n        /// <summary>\n        /// Initializes a new instance of the ApplicationUserLogin class.\n        /// </summary>\n        public ApplicationUserLogin()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ApplicationUserLogin class.\n        /// </summary>\n        public ApplicationUserLogin(string loginProvider = default(string), string providerKey = default(string))\n        {\n            LoginProvider = loginProvider;\n            ProviderKey = providerKey;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"loginProvider\")]\n        public string LoginProvider { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"providerKey\")]\n        public string ProviderKey { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ApplicationUser\n    {\n        /// <summary>\n        /// Initializes a new instance of the ApplicationUser class.\n        /// </summary>\n        public ApplicationUser()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ApplicationUser class.\n        /// </summary>\n        /// <param name=\"storeId\">Tenant id</param>\n        /// <param name=\"lockoutEndDateUtc\">Obsolete. Use LockoutEnd. DateTime\n        /// in UTC when lockout ends, any time in the past is considered not\n        /// locked out.</param>\n        /// <param name=\"userState\">Possible values include: 'PendingApproval',\n        /// 'Approved', 'Rejected'</param>\n        /// <param name=\"permissions\">Obsolete. All permissions from assigned\n        /// roles.</param>\n        /// <param name=\"logins\">External provider logins.</param>\n        /// <param name=\"passwordExpired\">Indicates that the password for this\n        /// user is expired and must be changed.</param>\n        /// <param name=\"lastPasswordChangedDate\">The last date when the\n        /// password was changed</param>\n        /// <param name=\"lastPasswordChangeRequestDate\">The last date when the\n        /// requested password change.</param>\n        /// <param name=\"lastLoginDate\">The last login date</param>\n        public ApplicationUser(string storeId = default(string), string memberId = default(string), bool? isAdministrator = default(bool?), string photoUrl = default(string), string userType = default(string), string status = default(string), string password = default(string), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), IList<Role> roles = default(IList<Role>), System.DateTime? lockoutEndDateUtc = default(System.DateTime?), string userState = default(string), IList<string> permissions = default(IList<string>), IList<ApplicationUserLogin> logins = default(IList<ApplicationUserLogin>), bool? passwordExpired = default(bool?), System.DateTime? lastPasswordChangedDate = default(System.DateTime?), System.DateTime? lastPasswordChangeRequestDate = default(System.DateTime?), System.DateTime? lastLoginDate = default(System.DateTime?), string id = default(string), string userName = default(string), string normalizedUserName = default(string), string email = default(string), string normalizedEmail = default(string), bool? emailConfirmed = default(bool?), string passwordHash = default(string), string securityStamp = default(string), string concurrencyStamp = default(string), string phoneNumber = default(string), bool? phoneNumberConfirmed = default(bool?), bool? twoFactorEnabled = default(bool?), System.DateTime? lockoutEnd = default(System.DateTime?), bool? lockoutEnabled = default(bool?), int? accessFailedCount = default(int?))\n        {\n            StoreId = storeId;\n            MemberId = memberId;\n            IsAdministrator = isAdministrator;\n            PhotoUrl = photoUrl;\n            UserType = userType;\n            Status = status;\n            Password = password;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Roles = roles;\n            LockoutEndDateUtc = lockoutEndDateUtc;\n            UserState = userState;\n            Permissions = permissions;\n            Logins = logins;\n            PasswordExpired = passwordExpired;\n            LastPasswordChangedDate = lastPasswordChangedDate;\n            LastPasswordChangeRequestDate = lastPasswordChangeRequestDate;\n            LastLoginDate = lastLoginDate;\n            Id = id;\n            UserName = userName;\n            NormalizedUserName = normalizedUserName;\n            Email = email;\n            NormalizedEmail = normalizedEmail;\n            EmailConfirmed = emailConfirmed;\n            PasswordHash = passwordHash;\n            SecurityStamp = securityStamp;\n            ConcurrencyStamp = concurrencyStamp;\n            PhoneNumber = phoneNumber;\n            PhoneNumberConfirmed = phoneNumberConfirmed;\n            TwoFactorEnabled = twoFactorEnabled;\n            LockoutEnd = lockoutEnd;\n            LockoutEnabled = lockoutEnabled;\n            AccessFailedCount = accessFailedCount;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets tenant id\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeId\")]\n        public string StoreId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"memberId\")]\n        public string MemberId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isAdministrator\")]\n        public bool? IsAdministrator { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"photoUrl\")]\n        public string PhotoUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"userType\")]\n        public string UserType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"status\")]\n        public string Status { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"password\")]\n        public string Password { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"roles\")]\n        public IList<Role> Roles { get; set; }\n\n        /// <summary>\n        /// Gets or sets obsolete. Use LockoutEnd. DateTime in UTC when lockout\n        /// ends, any time in the past is considered not locked out.\n        /// </summary>\n        [JsonProperty(PropertyName = \"lockoutEndDateUtc\")]\n        public System.DateTime? LockoutEndDateUtc { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'PendingApproval',\n        /// 'Approved', 'Rejected'\n        /// </summary>\n        [JsonProperty(PropertyName = \"userState\")]\n        public string UserState { get; set; }\n\n        /// <summary>\n        /// Gets or sets obsolete. All permissions from assigned roles.\n        /// </summary>\n        [JsonProperty(PropertyName = \"permissions\")]\n        public IList<string> Permissions { get; set; }\n\n        /// <summary>\n        /// Gets or sets external provider logins.\n        /// </summary>\n        [JsonProperty(PropertyName = \"logins\")]\n        public IList<ApplicationUserLogin> Logins { get; set; }\n\n        /// <summary>\n        /// Gets or sets indicates that the password for this user is expired\n        /// and must be changed.\n        /// </summary>\n        [JsonProperty(PropertyName = \"passwordExpired\")]\n        public bool? PasswordExpired { get; set; }\n\n        /// <summary>\n        /// Gets or sets the last date when the password was changed\n        /// </summary>\n        [JsonProperty(PropertyName = \"lastPasswordChangedDate\")]\n        public System.DateTime? LastPasswordChangedDate { get; set; }\n\n        /// <summary>\n        /// Gets or sets the last date when the requested password change.\n        /// </summary>\n        [JsonProperty(PropertyName = \"lastPasswordChangeRequestDate\")]\n        public System.DateTime? LastPasswordChangeRequestDate { get; set; }\n\n        /// <summary>\n        /// Gets or sets the last login date\n        /// </summary>\n        [JsonProperty(PropertyName = \"lastLoginDate\")]\n        public System.DateTime? LastLoginDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"userName\")]\n        public string UserName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"normalizedUserName\")]\n        public string NormalizedUserName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"email\")]\n        public string Email { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"normalizedEmail\")]\n        public string NormalizedEmail { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"emailConfirmed\")]\n        public bool? EmailConfirmed { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"passwordHash\")]\n        public string PasswordHash { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"securityStamp\")]\n        public string SecurityStamp { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"concurrencyStamp\")]\n        public string ConcurrencyStamp { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"phoneNumber\")]\n        public string PhoneNumber { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"phoneNumberConfirmed\")]\n        public bool? PhoneNumberConfirmed { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"twoFactorEnabled\")]\n        public bool? TwoFactorEnabled { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"lockoutEnd\")]\n        public System.DateTime? LockoutEnd { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"lockoutEnabled\")]\n        public bool? LockoutEnabled { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"accessFailedCount\")]\n        public int? AccessFailedCount { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ChangedEntitiesRequest\n    {\n        /// <summary>\n        /// Initializes a new instance of the ChangedEntitiesRequest class.\n        /// </summary>\n        public ChangedEntitiesRequest()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ChangedEntitiesRequest class.\n        /// </summary>\n        public ChangedEntitiesRequest(IList<string> entityNames = default(IList<string>), System.DateTime? modifiedSince = default(System.DateTime?))\n        {\n            EntityNames = entityNames;\n            ModifiedSince = modifiedSince;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"entityNames\")]\n        public IList<string> EntityNames { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedSince\")]\n        public System.DateTime? ModifiedSince { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ChangedEntity\n    {\n        /// <summary>\n        /// Initializes a new instance of the ChangedEntity class.\n        /// </summary>\n        public ChangedEntity()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ChangedEntity class.\n        /// </summary>\n        public ChangedEntity(string name = default(string), System.DateTime? modifiedDate = default(System.DateTime?))\n        {\n            Name = name;\n            ModifiedDate = modifiedDate;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ChangedEntitiesResponse\n    {\n        /// <summary>\n        /// Initializes a new instance of the ChangedEntitiesResponse class.\n        /// </summary>\n        public ChangedEntitiesResponse()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ChangedEntitiesResponse class.\n        /// </summary>\n        public ChangedEntitiesResponse(IList<ChangedEntity> entities = default(IList<ChangedEntity>))\n        {\n            Entities = entities;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"entities\")]\n        public IList<ChangedEntity> Entities { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SortInfo\n    {\n        /// <summary>\n        /// Initializes a new instance of the SortInfo class.\n        /// </summary>\n        public SortInfo()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SortInfo class.\n        /// </summary>\n        /// <param name=\"sortDirection\">Possible values include: 'Ascending',\n        /// 'Descending'</param>\n        public SortInfo(string sortColumn = default(string), string sortDirection = default(string))\n        {\n            SortColumn = sortColumn;\n            SortDirection = sortDirection;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortColumn\")]\n        public string SortColumn { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Ascending', 'Descending'\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortDirection\")]\n        public string SortDirection { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ChangeLogSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the ChangeLogSearchCriteria class.\n        /// </summary>\n        public ChangeLogSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ChangeLogSearchCriteria class.\n        /// </summary>\n        /// <param name=\"objectType\">Search object type</param>\n        /// <param name=\"keyword\">Search phrase</param>\n        /// <param name=\"searchPhrase\">Property is left for backward\n        /// compatibility</param>\n        /// <param name=\"languageCode\">Search phrase language</param>\n        public ChangeLogSearchCriteria(IList<string> operationTypes = default(IList<string>), System.DateTime? startDate = default(System.DateTime?), System.DateTime? endDate = default(System.DateTime?), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            OperationTypes = operationTypes;\n            StartDate = startDate;\n            EndDate = endDate;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"operationTypes\")]\n        public IList<string> OperationTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"startDate\")]\n        public System.DateTime? StartDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"endDate\")]\n        public System.DateTime? EndDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// Gets or sets search object type\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// Gets or sets search phrase\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// Gets or sets property is left for backward compatibility\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// Gets or sets search phrase language\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ChangeLogSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the ChangeLogSearchResult class.\n        /// </summary>\n        public ChangeLogSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ChangeLogSearchResult class.\n        /// </summary>\n        public ChangeLogSearchResult(int? totalCount = default(int?), IList<OperationLog> results = default(IList<OperationLog>))\n        {\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<OperationLog> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ChangePasswordRequest\n    {\n        /// <summary>\n        /// Initializes a new instance of the ChangePasswordRequest class.\n        /// </summary>\n        public ChangePasswordRequest()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ChangePasswordRequest class.\n        /// </summary>\n        public ChangePasswordRequest(string userName = default(string), string oldPassword = default(string), string newPassword = default(string))\n        {\n            UserName = userName;\n            OldPassword = oldPassword;\n            NewPassword = newPassword;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"userName\")]\n        public string UserName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"oldPassword\")]\n        public string OldPassword { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"newPassword\")]\n        public string NewPassword { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ConfirmEmailRequest\n    {\n        /// <summary>\n        /// Initializes a new instance of the ConfirmEmailRequest class.\n        /// </summary>\n        public ConfirmEmailRequest()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ConfirmEmailRequest class.\n        /// </summary>\n        public ConfirmEmailRequest(string token = default(string))\n        {\n            Token = token;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"token\")]\n        public string Token { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicPropertyObjectValue\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyObjectValue class.\n        /// </summary>\n        public DynamicPropertyObjectValue()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyObjectValue class.\n        /// </summary>\n        /// <param name=\"valueType\">Possible values include: 'Undefined',\n        /// 'ShortText', 'LongText', 'Integer', 'Decimal', 'DateTime',\n        /// 'Boolean', 'Html', 'Image'</param>\n        public DynamicPropertyObjectValue(string objectType = default(string), string objectId = default(string), string locale = default(string), object value = default(object), string valueId = default(string), string valueType = default(string), string propertyId = default(string), string propertyName = default(string))\n        {\n            ObjectType = objectType;\n            ObjectId = objectId;\n            Locale = locale;\n            Value = value;\n            ValueId = valueId;\n            ValueType = valueType;\n            PropertyId = propertyId;\n            PropertyName = propertyName;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"locale\")]\n        public string Locale { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"value\")]\n        public object Value { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueId\")]\n        public string ValueId { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Undefined', 'ShortText',\n        /// 'LongText', 'Integer', 'Decimal', 'DateTime', 'Boolean', 'Html',\n        /// 'Image'\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueType\")]\n        public string ValueType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyId\")]\n        public string PropertyId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyName\")]\n        public string PropertyName { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicPropertyName\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyName class.\n        /// </summary>\n        public DynamicPropertyName()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyName class.\n        /// </summary>\n        /// <param name=\"locale\">Language ID, e.g. en-US.</param>\n        public DynamicPropertyName(string locale = default(string), string name = default(string))\n        {\n            Locale = locale;\n            Name = name;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets language ID, e.g. en-US.\n        /// </summary>\n        [JsonProperty(PropertyName = \"locale\")]\n        public string Locale { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicObjectProperty\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicObjectProperty class.\n        /// </summary>\n        public DynamicObjectProperty()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the DynamicObjectProperty class.\n        /// </summary>\n        /// <param name=\"description\">dynamic property description</param>\n        /// <param name=\"isArray\">Defines whether a property supports multiple\n        /// values.</param>\n        /// <param name=\"isDictionary\">Dictionary has a predefined set of\n        /// values. User can select one or more of them and cannot enter\n        /// arbitrary values.</param>\n        /// <param name=\"isMultilingual\">For multilingual properties user can\n        /// enter different values for each of registered languages.</param>\n        /// <param name=\"valueType\">Possible values include: 'Undefined',\n        /// 'ShortText', 'LongText', 'Integer', 'Decimal', 'DateTime',\n        /// 'Boolean', 'Html', 'Image'</param>\n        /// <param name=\"displayNames\">Property names for different\n        /// languages.</param>\n        public DynamicObjectProperty(string objectId = default(string), IList<DynamicPropertyObjectValue> values = default(IList<DynamicPropertyObjectValue>), string name = default(string), string description = default(string), string objectType = default(string), bool? isArray = default(bool?), bool? isDictionary = default(bool?), bool? isMultilingual = default(bool?), bool? isRequired = default(bool?), int? displayOrder = default(int?), string valueType = default(string), IList<DynamicPropertyName> displayNames = default(IList<DynamicPropertyName>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            ObjectId = objectId;\n            Values = values;\n            Name = name;\n            Description = description;\n            ObjectType = objectType;\n            IsArray = isArray;\n            IsDictionary = isDictionary;\n            IsMultilingual = isMultilingual;\n            IsRequired = isRequired;\n            DisplayOrder = displayOrder;\n            ValueType = valueType;\n            DisplayNames = displayNames;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"values\")]\n        public IList<DynamicPropertyObjectValue> Values { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Gets or sets dynamic property description\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// Gets or sets defines whether a property supports multiple values.\n        /// </summary>\n        [JsonProperty(PropertyName = \"isArray\")]\n        public bool? IsArray { get; set; }\n\n        /// <summary>\n        /// Gets or sets dictionary has a predefined set of values. User can\n        /// select one or more of them and cannot enter arbitrary values.\n        /// </summary>\n        [JsonProperty(PropertyName = \"isDictionary\")]\n        public bool? IsDictionary { get; set; }\n\n        /// <summary>\n        /// Gets or sets for multilingual properties user can enter different\n        /// values for each of registered languages.\n        /// </summary>\n        [JsonProperty(PropertyName = \"isMultilingual\")]\n        public bool? IsMultilingual { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isRequired\")]\n        public bool? IsRequired { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayOrder\")]\n        public int? DisplayOrder { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Undefined', 'ShortText',\n        /// 'LongText', 'Integer', 'Decimal', 'DateTime', 'Boolean', 'Html',\n        /// 'Image'\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueType\")]\n        public string ValueType { get; set; }\n\n        /// <summary>\n        /// Gets or sets property names for different languages.\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayNames\")]\n        public IList<DynamicPropertyName> DisplayNames { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicProperty\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicProperty class.\n        /// </summary>\n        public DynamicProperty()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the DynamicProperty class.\n        /// </summary>\n        /// <param name=\"description\">dynamic property description</param>\n        /// <param name=\"isArray\">Defines whether a property supports multiple\n        /// values.</param>\n        /// <param name=\"isDictionary\">Dictionary has a predefined set of\n        /// values. User can select one or more of them and cannot enter\n        /// arbitrary values.</param>\n        /// <param name=\"isMultilingual\">For multilingual properties user can\n        /// enter different values for each of registered languages.</param>\n        /// <param name=\"valueType\">Possible values include: 'Undefined',\n        /// 'ShortText', 'LongText', 'Integer', 'Decimal', 'DateTime',\n        /// 'Boolean', 'Html', 'Image'</param>\n        /// <param name=\"displayNames\">Property names for different\n        /// languages.</param>\n        public DynamicProperty(string name = default(string), string description = default(string), string objectType = default(string), bool? isArray = default(bool?), bool? isDictionary = default(bool?), bool? isMultilingual = default(bool?), bool? isRequired = default(bool?), int? displayOrder = default(int?), string valueType = default(string), IList<DynamicPropertyName> displayNames = default(IList<DynamicPropertyName>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Name = name;\n            Description = description;\n            ObjectType = objectType;\n            IsArray = isArray;\n            IsDictionary = isDictionary;\n            IsMultilingual = isMultilingual;\n            IsRequired = isRequired;\n            DisplayOrder = displayOrder;\n            ValueType = valueType;\n            DisplayNames = displayNames;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Gets or sets dynamic property description\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// Gets or sets defines whether a property supports multiple values.\n        /// </summary>\n        [JsonProperty(PropertyName = \"isArray\")]\n        public bool? IsArray { get; set; }\n\n        /// <summary>\n        /// Gets or sets dictionary has a predefined set of values. User can\n        /// select one or more of them and cannot enter arbitrary values.\n        /// </summary>\n        [JsonProperty(PropertyName = \"isDictionary\")]\n        public bool? IsDictionary { get; set; }\n\n        /// <summary>\n        /// Gets or sets for multilingual properties user can enter different\n        /// values for each of registered languages.\n        /// </summary>\n        [JsonProperty(PropertyName = \"isMultilingual\")]\n        public bool? IsMultilingual { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isRequired\")]\n        public bool? IsRequired { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayOrder\")]\n        public int? DisplayOrder { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Undefined', 'ShortText',\n        /// 'LongText', 'Integer', 'Decimal', 'DateTime', 'Boolean', 'Html',\n        /// 'Image'\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueType\")]\n        public string ValueType { get; set; }\n\n        /// <summary>\n        /// Gets or sets property names for different languages.\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayNames\")]\n        public IList<DynamicPropertyName> DisplayNames { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicPropertyDictionaryItemSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the\n        /// DynamicPropertyDictionaryItemSearchCriteria class.\n        /// </summary>\n        public DynamicPropertyDictionaryItemSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the\n        /// DynamicPropertyDictionaryItemSearchCriteria class.\n        /// </summary>\n        /// <param name=\"objectType\">Search object type</param>\n        /// <param name=\"keyword\">Search phrase</param>\n        /// <param name=\"searchPhrase\">Property is left for backward\n        /// compatibility</param>\n        /// <param name=\"languageCode\">Search phrase language</param>\n        public DynamicPropertyDictionaryItemSearchCriteria(string propertyId = default(string), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            PropertyId = propertyId;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyId\")]\n        public string PropertyId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// Gets or sets search object type\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// Gets or sets search phrase\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// Gets or sets property is left for backward compatibility\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// Gets or sets search phrase language\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicPropertyDictionaryItemSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the\n        /// DynamicPropertyDictionaryItemSearchResult class.\n        /// </summary>\n        public DynamicPropertyDictionaryItemSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the\n        /// DynamicPropertyDictionaryItemSearchResult class.\n        /// </summary>\n        public DynamicPropertyDictionaryItemSearchResult(int? totalCount = default(int?), IList<DynamicPropertyDictionaryItem> results = default(IList<DynamicPropertyDictionaryItem>))\n        {\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<DynamicPropertyDictionaryItem> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicPropertySearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertySearchCriteria\n        /// class.\n        /// </summary>\n        public DynamicPropertySearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertySearchCriteria\n        /// class.\n        /// </summary>\n        /// <param name=\"objectType\">Search object type</param>\n        /// <param name=\"keyword\">Search phrase</param>\n        /// <param name=\"searchPhrase\">Property is left for backward\n        /// compatibility</param>\n        /// <param name=\"languageCode\">Search phrase language</param>\n        public DynamicPropertySearchCriteria(string typeName = default(string), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            TypeName = typeName;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"typeName\")]\n        public string TypeName { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// Gets or sets search object type\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// Gets or sets search phrase\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// Gets or sets property is left for backward compatibility\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// Gets or sets search phrase language\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicPropertySearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertySearchResult\n        /// class.\n        /// </summary>\n        public DynamicPropertySearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertySearchResult\n        /// class.\n        /// </summary>\n        public DynamicPropertySearchResult(int? totalCount = default(int?), IList<DynamicProperty> results = default(IList<DynamicProperty>))\n        {\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<DynamicProperty> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class IdentityError\n    {\n        /// <summary>\n        /// Initializes a new instance of the IdentityError class.\n        /// </summary>\n        public IdentityError()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the IdentityError class.\n        /// </summary>\n        public IdentityError(string code = default(string), string description = default(string))\n        {\n            Code = code;\n            Description = description;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"code\")]\n        public string Code { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class IdentityResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the IdentityResult class.\n        /// </summary>\n        public IdentityResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the IdentityResult class.\n        /// </summary>\n        public IdentityResult(bool? succeeded = default(bool?), IList<IdentityError> errors = default(IList<IdentityError>))\n        {\n            Succeeded = succeeded;\n            Errors = errors;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"succeeded\")]\n        public bool? Succeeded { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"errors\")]\n        public IList<IdentityError> Errors { get; private set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Job\n    {\n        /// <summary>\n        /// Initializes a new instance of the Job class.\n        /// </summary>\n        public Job()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Job class.\n        /// </summary>\n        public Job(string state = default(string), bool? completed = default(bool?), string id = default(string))\n        {\n            State = state;\n            Completed = completed;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"state\")]\n        public string State { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"completed\")]\n        public bool? Completed { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class JsonElement\n    {\n        /// <summary>\n        /// Initializes a new instance of the JsonElement class.\n        /// </summary>\n        public JsonElement()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the JsonElement class.\n        /// </summary>\n        /// <param name=\"valueKind\">Possible values include: 'Undefined',\n        /// 'Object', 'Array', 'String', 'Number', 'True', 'False',\n        /// 'Null'</param>\n        public JsonElement(string valueKind = default(string))\n        {\n            ValueKind = valueKind;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Undefined', 'Object',\n        /// 'Array', 'String', 'Number', 'True', 'False', 'Null'\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueKind\")]\n        public string ValueKind { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class LastModifiedResponse\n    {\n        /// <summary>\n        /// Initializes a new instance of the LastModifiedResponse class.\n        /// </summary>\n        public LastModifiedResponse()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the LastModifiedResponse class.\n        /// </summary>\n        public LastModifiedResponse(string scope = default(string), System.DateTime? lastModifiedDate = default(System.DateTime?))\n        {\n            Scope = scope;\n            LastModifiedDate = lastModifiedDate;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"scope\")]\n        public string Scope { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"lastModifiedDate\")]\n        public System.DateTime? LastModifiedDate { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class License\n    {\n        /// <summary>\n        /// Initializes a new instance of the License class.\n        /// </summary>\n        public License()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the License class.\n        /// </summary>\n        public License(string type = default(string), string customerName = default(string), string customerEmail = default(string), System.DateTime? expirationDate = default(System.DateTime?), string rawLicense = default(string))\n        {\n            Type = type;\n            CustomerName = customerName;\n            CustomerEmail = customerEmail;\n            ExpirationDate = expirationDate;\n            RawLicense = rawLicense;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"customerName\")]\n        public string CustomerName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"customerEmail\")]\n        public string CustomerEmail { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"expirationDate\")]\n        public System.DateTime? ExpirationDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"rawLicense\")]\n        public string RawLicense { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class LoginRequest\n    {\n        /// <summary>\n        /// Initializes a new instance of the LoginRequest class.\n        /// </summary>\n        public LoginRequest()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the LoginRequest class.\n        /// </summary>\n        public LoginRequest(string userName = default(string), string password = default(string), bool? rememberMe = default(bool?))\n        {\n            UserName = userName;\n            Password = password;\n            RememberMe = rememberMe;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"userName\")]\n        public string UserName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"password\")]\n        public string Password { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"rememberMe\")]\n        public bool? RememberMe { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ProgressMessage\n    {\n        /// <summary>\n        /// Initializes a new instance of the ProgressMessage class.\n        /// </summary>\n        public ProgressMessage()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ProgressMessage class.\n        /// </summary>\n        /// <param name=\"level\">Possible values include: 'Info', 'Warning',\n        /// 'Debug', 'Error'</param>\n        public ProgressMessage(string message = default(string), string level = default(string))\n        {\n            Message = message;\n            Level = level;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"message\")]\n        public string Message { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Info', 'Warning', 'Debug',\n        /// 'Error'\n        /// </summary>\n        [JsonProperty(PropertyName = \"level\")]\n        public string Level { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ModuleAutoInstallPushNotification\n    {\n        /// <summary>\n        /// Initializes a new instance of the ModuleAutoInstallPushNotification\n        /// class.\n        /// </summary>\n        public ModuleAutoInstallPushNotification()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ModuleAutoInstallPushNotification\n        /// class.\n        /// </summary>\n        /// <param name=\"errorCount\">Gets the count of errors during\n        /// processing.</param>\n        public ModuleAutoInstallPushNotification(System.DateTime? started = default(System.DateTime?), System.DateTime? finished = default(System.DateTime?), IList<ProgressMessage> progressLog = default(IList<ProgressMessage>), int? errorCount = default(int?), string serverId = default(string), string creator = default(string), System.DateTime? created = default(System.DateTime?), bool? isNew = default(bool?), string notifyType = default(string), string description = default(string), string title = default(string), int? repeatCount = default(int?), string id = default(string))\n        {\n            Started = started;\n            Finished = finished;\n            ProgressLog = progressLog;\n            ErrorCount = errorCount;\n            ServerId = serverId;\n            Creator = creator;\n            Created = created;\n            IsNew = isNew;\n            NotifyType = notifyType;\n            Description = description;\n            Title = title;\n            RepeatCount = repeatCount;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"started\")]\n        public System.DateTime? Started { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"finished\")]\n        public System.DateTime? Finished { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"progressLog\")]\n        public IList<ProgressMessage> ProgressLog { get; set; }\n\n        /// <summary>\n        /// Gets the count of errors during processing.\n        /// </summary>\n        [JsonProperty(PropertyName = \"errorCount\")]\n        public int? ErrorCount { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"serverId\")]\n        public string ServerId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"creator\")]\n        public string Creator { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"created\")]\n        public System.DateTime? Created { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isNew\")]\n        public bool? IsNew { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"notifyType\")]\n        public string NotifyType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"title\")]\n        public string Title { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"repeatCount\")]\n        public int? RepeatCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ModulePushNotification\n    {\n        /// <summary>\n        /// Initializes a new instance of the ModulePushNotification class.\n        /// </summary>\n        public ModulePushNotification()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ModulePushNotification class.\n        /// </summary>\n        /// <param name=\"errorCount\">Gets the count of errors during\n        /// processing.</param>\n        public ModulePushNotification(System.DateTime? started = default(System.DateTime?), System.DateTime? finished = default(System.DateTime?), IList<ProgressMessage> progressLog = default(IList<ProgressMessage>), int? errorCount = default(int?), string serverId = default(string), string creator = default(string), System.DateTime? created = default(System.DateTime?), bool? isNew = default(bool?), string notifyType = default(string), string description = default(string), string title = default(string), int? repeatCount = default(int?), string id = default(string))\n        {\n            Started = started;\n            Finished = finished;\n            ProgressLog = progressLog;\n            ErrorCount = errorCount;\n            ServerId = serverId;\n            Creator = creator;\n            Created = created;\n            IsNew = isNew;\n            NotifyType = notifyType;\n            Description = description;\n            Title = title;\n            RepeatCount = repeatCount;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"started\")]\n        public System.DateTime? Started { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"finished\")]\n        public System.DateTime? Finished { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"progressLog\")]\n        public IList<ProgressMessage> ProgressLog { get; set; }\n\n        /// <summary>\n        /// Gets the count of errors during processing.\n        /// </summary>\n        [JsonProperty(PropertyName = \"errorCount\")]\n        public int? ErrorCount { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"serverId\")]\n        public string ServerId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"creator\")]\n        public string Creator { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"created\")]\n        public System.DateTime? Created { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isNew\")]\n        public bool? IsNew { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"notifyType\")]\n        public string NotifyType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"title\")]\n        public string Title { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"repeatCount\")]\n        public int? RepeatCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class OAuthAppSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the OAuthAppSearchCriteria class.\n        /// </summary>\n        public OAuthAppSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the OAuthAppSearchCriteria class.\n        /// </summary>\n        /// <param name=\"objectType\">Search object type</param>\n        /// <param name=\"keyword\">Search phrase</param>\n        /// <param name=\"searchPhrase\">Property is left for backward\n        /// compatibility</param>\n        /// <param name=\"languageCode\">Search phrase language</param>\n        public OAuthAppSearchCriteria(string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// Gets or sets search object type\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// Gets or sets search phrase\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// Gets or sets property is left for backward compatibility\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// Gets or sets search phrase language\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class OpenIddictApplicationDescriptor\n    {\n        /// <summary>\n        /// Initializes a new instance of the OpenIddictApplicationDescriptor\n        /// class.\n        /// </summary>\n        public OpenIddictApplicationDescriptor()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the OpenIddictApplicationDescriptor\n        /// class.\n        /// </summary>\n        public OpenIddictApplicationDescriptor(string clientId = default(string), string clientSecret = default(string), string consentType = default(string), string displayName = default(string), IDictionary<string, string> displayNames = default(IDictionary<string, string>), IList<string> permissions = default(IList<string>), IList<string> postLogoutRedirectUris = default(IList<string>), IDictionary<string, JsonElement> properties = default(IDictionary<string, JsonElement>), IList<string> redirectUris = default(IList<string>), IList<string> requirements = default(IList<string>), string type = default(string))\n        {\n            ClientId = clientId;\n            ClientSecret = clientSecret;\n            ConsentType = consentType;\n            DisplayName = displayName;\n            DisplayNames = displayNames;\n            Permissions = permissions;\n            PostLogoutRedirectUris = postLogoutRedirectUris;\n            Properties = properties;\n            RedirectUris = redirectUris;\n            Requirements = requirements;\n            Type = type;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"clientId\")]\n        public string ClientId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"clientSecret\")]\n        public string ClientSecret { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"consentType\")]\n        public string ConsentType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayName\")]\n        public string DisplayName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayNames\")]\n        public IDictionary<string, string> DisplayNames { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"permissions\")]\n        public IList<string> Permissions { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"postLogoutRedirectUris\")]\n        public IList<string> PostLogoutRedirectUris { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"properties\")]\n        public IDictionary<string, JsonElement> Properties { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"redirectUris\")]\n        public IList<string> RedirectUris { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"requirements\")]\n        public IList<string> Requirements { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class OAuthAppSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the OAuthAppSearchResult class.\n        /// </summary>\n        public OAuthAppSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the OAuthAppSearchResult class.\n        /// </summary>\n        public OAuthAppSearchResult(int? totalCount = default(int?), IList<OpenIddictApplicationDescriptor> results = default(IList<OpenIddictApplicationDescriptor>))\n        {\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<OpenIddictApplicationDescriptor> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class OpenIddictResponse\n    {\n        /// <summary>\n        /// Initializes a new instance of the OpenIddictResponse class.\n        /// </summary>\n        public OpenIddictResponse()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the OpenIddictResponse class.\n        /// </summary>\n        public OpenIddictResponse(string accessToken = default(string), string code = default(string), string deviceCode = default(string), string error = default(string), string errorDescription = default(string), string errorUri = default(string), long? expiresIn = default(long?), string idToken = default(string), string refreshToken = default(string), string scope = default(string), string state = default(string), string tokenType = default(string), string userCode = default(string), int? count = default(int?))\n        {\n            AccessToken = accessToken;\n            Code = code;\n            DeviceCode = deviceCode;\n            Error = error;\n            ErrorDescription = errorDescription;\n            ErrorUri = errorUri;\n            ExpiresIn = expiresIn;\n            IdToken = idToken;\n            RefreshToken = refreshToken;\n            Scope = scope;\n            State = state;\n            TokenType = tokenType;\n            UserCode = userCode;\n            Count = count;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"accessToken\")]\n        public string AccessToken { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"code\")]\n        public string Code { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"deviceCode\")]\n        public string DeviceCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"error\")]\n        public string Error { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"errorDescription\")]\n        public string ErrorDescription { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"errorUri\")]\n        public string ErrorUri { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"expiresIn\")]\n        public long? ExpiresIn { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"idToken\")]\n        public string IdToken { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"refreshToken\")]\n        public string RefreshToken { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"scope\")]\n        public string Scope { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"state\")]\n        public string State { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"tokenType\")]\n        public string TokenType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"userCode\")]\n        public string UserCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"count\")]\n        public int? Count { get; private set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class PushNotification\n    {\n        /// <summary>\n        /// Initializes a new instance of the PushNotification class.\n        /// </summary>\n        public PushNotification()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PushNotification class.\n        /// </summary>\n        public PushNotification(string serverId = default(string), string creator = default(string), System.DateTime? created = default(System.DateTime?), bool? isNew = default(bool?), string notifyType = default(string), string description = default(string), string title = default(string), int? repeatCount = default(int?), string id = default(string))\n        {\n            ServerId = serverId;\n            Creator = creator;\n            Created = created;\n            IsNew = isNew;\n            NotifyType = notifyType;\n            Description = description;\n            Title = title;\n            RepeatCount = repeatCount;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"serverId\")]\n        public string ServerId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"creator\")]\n        public string Creator { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"created\")]\n        public System.DateTime? Created { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isNew\")]\n        public bool? IsNew { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"notifyType\")]\n        public string NotifyType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"title\")]\n        public string Title { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"repeatCount\")]\n        public int? RepeatCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class PushNotificationSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the PushNotificationSearchCriteria\n        /// class.\n        /// </summary>\n        public PushNotificationSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PushNotificationSearchCriteria\n        /// class.\n        /// </summary>\n        /// <param name=\"objectType\">Search object type</param>\n        /// <param name=\"keyword\">Search phrase</param>\n        /// <param name=\"searchPhrase\">Property is left for backward\n        /// compatibility</param>\n        /// <param name=\"languageCode\">Search phrase language</param>\n        public PushNotificationSearchCriteria(IList<string> ids = default(IList<string>), bool? onlyNew = default(bool?), System.DateTime? startDate = default(System.DateTime?), System.DateTime? endDate = default(System.DateTime?), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            Ids = ids;\n            OnlyNew = onlyNew;\n            StartDate = startDate;\n            EndDate = endDate;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"ids\")]\n        public IList<string> Ids { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"onlyNew\")]\n        public bool? OnlyNew { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"startDate\")]\n        public System.DateTime? StartDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"endDate\")]\n        public System.DateTime? EndDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// Gets or sets search object type\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// Gets or sets search phrase\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// Gets or sets property is left for backward compatibility\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// Gets or sets search phrase language\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class PushNotificationSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the PushNotificationSearchResult\n        /// class.\n        /// </summary>\n        public PushNotificationSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the PushNotificationSearchResult\n        /// class.\n        /// </summary>\n        public PushNotificationSearchResult(int? totalCount = default(int?), int? newCount = default(int?), IList<PushNotification> notifyEvents = default(IList<PushNotification>))\n        {\n            TotalCount = totalCount;\n            NewCount = newCount;\n            NotifyEvents = notifyEvents;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"newCount\")]\n        public int? NewCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"notifyEvents\")]\n        public IList<PushNotification> NotifyEvents { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ResetPasswordConfirmRequest\n    {\n        /// <summary>\n        /// Initializes a new instance of the ResetPasswordConfirmRequest\n        /// class.\n        /// </summary>\n        public ResetPasswordConfirmRequest()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ResetPasswordConfirmRequest\n        /// class.\n        /// </summary>\n        public ResetPasswordConfirmRequest(string token = default(string), string newPassword = default(string), bool? forcePasswordChangeOnNextSignIn = default(bool?))\n        {\n            Token = token;\n            NewPassword = newPassword;\n            ForcePasswordChangeOnNextSignIn = forcePasswordChangeOnNextSignIn;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"token\")]\n        public string Token { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"newPassword\")]\n        public string NewPassword { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"forcePasswordChangeOnNextSignIn\")]\n        public bool? ForcePasswordChangeOnNextSignIn { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class RoleSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the RoleSearchCriteria class.\n        /// </summary>\n        public RoleSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the RoleSearchCriteria class.\n        /// </summary>\n        /// <param name=\"objectType\">Search object type</param>\n        /// <param name=\"keyword\">Search phrase</param>\n        /// <param name=\"searchPhrase\">Property is left for backward\n        /// compatibility</param>\n        /// <param name=\"languageCode\">Search phrase language</param>\n        public RoleSearchCriteria(string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// Gets or sets search object type\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// Gets or sets search phrase\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// Gets or sets property is left for backward compatibility\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// Gets or sets search phrase language\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class RoleSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the RoleSearchResult class.\n        /// </summary>\n        public RoleSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the RoleSearchResult class.\n        /// </summary>\n        public RoleSearchResult(IList<Role> roles = default(IList<Role>), int? totalCount = default(int?), IList<Role> results = default(IList<Role>))\n        {\n            Roles = roles;\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"roles\")]\n        public IList<Role> Roles { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<Role> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SecurityResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the SecurityResult class.\n        /// </summary>\n        public SecurityResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SecurityResult class.\n        /// </summary>\n        public SecurityResult(bool? succeeded = default(bool?), IList<string> errors = default(IList<string>))\n        {\n            Succeeded = succeeded;\n            Errors = errors;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"succeeded\")]\n        public bool? Succeeded { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"errors\")]\n        public IList<string> Errors { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SignInResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the SignInResult class.\n        /// </summary>\n        public SignInResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SignInResult class.\n        /// </summary>\n        public SignInResult(bool? succeeded = default(bool?), bool? isLockedOut = default(bool?), bool? isNotAllowed = default(bool?), bool? requiresTwoFactor = default(bool?))\n        {\n            Succeeded = succeeded;\n            IsLockedOut = isLockedOut;\n            IsNotAllowed = isNotAllowed;\n            RequiresTwoFactor = requiresTwoFactor;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"succeeded\")]\n        public bool? Succeeded { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isLockedOut\")]\n        public bool? IsLockedOut { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isNotAllowed\")]\n        public bool? IsNotAllowed { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"requiresTwoFactor\")]\n        public bool? RequiresTwoFactor { get; private set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class StringIdentityUserRole\n    {\n        /// <summary>\n        /// Initializes a new instance of the StringIdentityUserRole class.\n        /// </summary>\n        public StringIdentityUserRole()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the StringIdentityUserRole class.\n        /// </summary>\n        public StringIdentityUserRole(string userId = default(string), string roleId = default(string))\n        {\n            UserId = userId;\n            RoleId = roleId;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"userId\")]\n        public string UserId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"roleId\")]\n        public string RoleId { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SystemInfo\n    {\n        /// <summary>\n        /// Initializes a new instance of the SystemInfo class.\n        /// </summary>\n        public SystemInfo()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SystemInfo class.\n        /// </summary>\n        public SystemInfo(string platformVersion = default(string), License license = default(License), IList<ModuleDescriptor> installedModules = default(IList<ModuleDescriptor>), string version = default(string), bool? is64BitOperatingSystem = default(bool?), bool? is64BitProcess = default(bool?), string databaseProvider = default(string))\n        {\n            PlatformVersion = platformVersion;\n            License = license;\n            InstalledModules = installedModules;\n            Version = version;\n            Is64BitOperatingSystem = is64BitOperatingSystem;\n            Is64BitProcess = is64BitProcess;\n            DatabaseProvider = databaseProvider;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"platformVersion\")]\n        public string PlatformVersion { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"license\")]\n        public License License { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"installedModules\")]\n        public IList<ModuleDescriptor> InstalledModules { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"version\")]\n        public string Version { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"is64BitOperatingSystem\")]\n        public bool? Is64BitOperatingSystem { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"is64BitProcess\")]\n        public bool? Is64BitProcess { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"databaseProvider\")]\n        public string DatabaseProvider { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class UserDetail\n    {\n        /// <summary>\n        /// Initializes a new instance of the UserDetail class.\n        /// </summary>\n        public UserDetail()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the UserDetail class.\n        /// </summary>\n        public UserDetail(IList<string> permissions = default(IList<string>), string userName = default(string), bool? isAdministrator = default(bool?), bool? passwordExpired = default(bool?), int? daysTillPasswordExpiry = default(int?), string id = default(string))\n        {\n            Permissions = permissions;\n            UserName = userName;\n            IsAdministrator = isAdministrator;\n            PasswordExpired = passwordExpired;\n            DaysTillPasswordExpiry = daysTillPasswordExpiry;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"permissions\")]\n        public IList<string> Permissions { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"userName\")]\n        public string UserName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isAdministrator\")]\n        public bool? IsAdministrator { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"passwordExpired\")]\n        public bool? PasswordExpired { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"daysTillPasswordExpiry\")]\n        public int? DaysTillPasswordExpiry { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class UserLockedResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the UserLockedResult class.\n        /// </summary>\n        public UserLockedResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the UserLockedResult class.\n        /// </summary>\n        public UserLockedResult(bool? locked = default(bool?))\n        {\n            Locked = locked;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"locked\")]\n        public bool? Locked { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class UserSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the UserSearchCriteria class.\n        /// </summary>\n        public UserSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the UserSearchCriteria class.\n        /// </summary>\n        /// <param name=\"objectType\">Search object type</param>\n        /// <param name=\"keyword\">Search phrase</param>\n        /// <param name=\"searchPhrase\">Property is left for backward\n        /// compatibility</param>\n        /// <param name=\"languageCode\">Search phrase language</param>\n        public UserSearchCriteria(string memberId = default(string), IList<string> memberIds = default(IList<string>), System.DateTime? modifiedSinceDate = default(System.DateTime?), IList<string> roles = default(IList<string>), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            MemberId = memberId;\n            MemberIds = memberIds;\n            ModifiedSinceDate = modifiedSinceDate;\n            Roles = roles;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"memberId\")]\n        public string MemberId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"memberIds\")]\n        public IList<string> MemberIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedSinceDate\")]\n        public System.DateTime? ModifiedSinceDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"roles\")]\n        public IList<string> Roles { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// Gets or sets search object type\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// Gets or sets search phrase\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// Gets or sets property is left for backward compatibility\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// Gets or sets search phrase language\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class UserSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the UserSearchResult class.\n        /// </summary>\n        public UserSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the UserSearchResult class.\n        /// </summary>\n        public UserSearchResult(IList<ApplicationUser> users = default(IList<ApplicationUser>), int? totalCount = default(int?), IList<ApplicationUser> results = default(IList<ApplicationUser>))\n        {\n            Users = users;\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"users\")]\n        public IList<ApplicationUser> Users { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<ApplicationUser> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ValidatePasswordResetTokenRequest\n    {\n        /// <summary>\n        /// Initializes a new instance of the ValidatePasswordResetTokenRequest\n        /// class.\n        /// </summary>\n        public ValidatePasswordResetTokenRequest()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ValidatePasswordResetTokenRequest\n        /// class.\n        /// </summary>\n        public ValidatePasswordResetTokenRequest(string token = default(string))\n        {\n            Token = token;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"token\")]\n        public string Token { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class VerifyTokenRequest\n    {\n        /// <summary>\n        /// Initializes a new instance of the VerifyTokenRequest class.\n        /// </summary>\n        public VerifyTokenRequest()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the VerifyTokenRequest class.\n        /// </summary>\n        public VerifyTokenRequest(string tokenProvider = default(string), string purpose = default(string), string token = default(string))\n        {\n            TokenProvider = tokenProvider;\n            Purpose = purpose;\n            Token = token;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"tokenProvider\")]\n        public string TokenProvider { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"purpose\")]\n        public string Purpose { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"token\")]\n        public string Token { get; set; }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/AutoRestClients/SitemapsModuleApi.cs",
    "content": "// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SitemapsModuleClient : ServiceClient<SitemapsModuleClient>, ISitemapsModuleClient\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        public System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        public JsonSerializerSettings SerializationSettings { get; private set; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        public JsonSerializerSettings DeserializationSettings { get; private set; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client subscription.\n        /// </summary>\n        public ServiceClientCredentials Credentials { get; private set; }\n\n        /// <summary>\n        /// Gets the ISitemapsModuleApiOperations.\n        /// </summary>\n        public virtual ISitemapsModuleApiOperations SitemapsModuleApi { get; private set; }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapsModuleClient class.\n        /// </summary>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling SitemapsModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        protected SitemapsModuleClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapsModuleClient class.\n        /// </summary>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected SitemapsModuleClient(params DelegatingHandler[] handlers) : base(handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapsModuleClient class.\n        /// </summary>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected SitemapsModuleClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapsModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected SitemapsModuleClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapsModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected SitemapsModuleClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapsModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public SitemapsModuleClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapsModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling SitemapsModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public SitemapsModuleClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapsModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public SitemapsModuleClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapsModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public SitemapsModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapsModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public SitemapsModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// An optional partial-method to perform custom initialization.\n        ///</summary>\n        partial void CustomInitialize();\n        /// <summary>\n        /// Initializes client properties.\n        /// </summary>\n        private void Initialize()\n        {\n            SitemapsModuleApi = new SitemapsModuleApiOperations(this);\n            BaseUri = new System.Uri(\"http://localhost\");\n            SerializationSettings = new JsonSerializerSettings\n            {\n                Formatting = Newtonsoft.Json.Formatting.Indented,\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new  List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            DeserializationSettings = new JsonSerializerSettings\n            {\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            CustomInitialize();\n        }\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// </summary>\n    public partial interface ISitemapsModuleClient : System.IDisposable\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        JsonSerializerSettings SerializationSettings { get; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        JsonSerializerSettings DeserializationSettings { get; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client\n        /// subscription.\n        /// </summary>\n        ServiceClientCredentials Credentials { get; }\n\n\n        /// <summary>\n        /// Gets the ISitemapsModuleApiOperations.\n        /// </summary>\n        ISitemapsModuleApiOperations SitemapsModuleApi { get; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// SitemapsModuleApiOperations operations.\n    /// </summary>\n    public partial class SitemapsModuleApiOperations : IServiceOperations<SitemapsModuleClient>, ISitemapsModuleApiOperations\n    {\n        /// <summary>\n        /// Initializes a new instance of the SitemapsModuleApiOperations class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public SitemapsModuleApiOperations(SitemapsModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the SitemapsModuleClient\n        /// </summary>\n        public SitemapsModuleClient Client { get; private set; }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SitemapSearchResult>> SearchSitemapsWithHttpMessagesAsync(SitemapSearchCriteria body = default(SitemapSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchSitemaps\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/sitemaps/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SitemapSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SitemapSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='id'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Sitemap>> GetSitemapByIdWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetSitemapById\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/sitemaps/{id}\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Sitemap>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Sitemap>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> AddSitemapWithHttpMessagesAsync(Sitemap body = default(Sitemap), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"AddSitemap\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/sitemaps\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UpdateSitemapWithHttpMessagesAsync(Sitemap body = default(Sitemap), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdateSitemap\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/sitemaps\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='ids'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteSitemapWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteSitemap\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/sitemaps\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Join(\",\", ids))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SitemapItemsSearchResult>> SearchSitemapItemsWithHttpMessagesAsync(SitemapItemSearchCriteria body = default(SitemapItemSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchSitemapItems\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/sitemaps/items/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SitemapItemsSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SitemapItemsSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='sitemapId'>\n        /// </param>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> AddSitemapItemsWithHttpMessagesAsync(string sitemapId, IList<SitemapItem> body = default(IList<SitemapItem>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (sitemapId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"sitemapId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"sitemapId\", sitemapId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"AddSitemapItems\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/sitemaps/{sitemapId}/items\").ToString();\n            _url = _url.Replace(\"{sitemapId}\", System.Uri.EscapeDataString(sitemapId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='itemIds'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> RemoveSitemapItemsWithHttpMessagesAsync(IList<string> itemIds = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"itemIds\", itemIds);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"RemoveSitemapItems\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/sitemaps/items\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (itemIds != null)\n            {\n                _queryParameters.Add(string.Format(\"itemIds={0}\", System.Uri.EscapeDataString(string.Join(\",\", itemIds))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<string>>> GetSitemapsSchemaWithHttpMessagesAsync(string storeId = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetSitemapsSchema\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/sitemaps/schema\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (storeId != null)\n            {\n                _queryParameters.Add(string.Format(\"storeId={0}\", System.Uri.EscapeDataString(storeId)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<string>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<string>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='baseUrl'>\n        /// </param>\n        /// <param name='sitemapUrl'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Stream>> GenerateSitemapWithHttpMessagesAsync(string storeId = default(string), string baseUrl = default(string), string sitemapUrl = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"baseUrl\", baseUrl);\n                tracingParameters.Add(\"sitemapUrl\", sitemapUrl);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GenerateSitemap\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/sitemaps/generate\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (storeId != null)\n            {\n                _queryParameters.Add(string.Format(\"storeId={0}\", System.Uri.EscapeDataString(storeId)));\n            }\n            if (baseUrl != null)\n            {\n                _queryParameters.Add(string.Format(\"baseUrl={0}\", System.Uri.EscapeDataString(baseUrl)));\n            }\n            if (sitemapUrl != null)\n            {\n                _queryParameters.Add(string.Format(\"sitemapUrl={0}\", System.Uri.EscapeDataString(sitemapUrl)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Stream>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false);\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='baseUrl'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<SitemapDownloadNotification>> DownloadSitemapWithHttpMessagesAsync(string storeId = default(string), string baseUrl = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"baseUrl\", baseUrl);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DownloadSitemap\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/sitemaps/download\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (storeId != null)\n            {\n                _queryParameters.Add(string.Format(\"storeId={0}\", System.Uri.EscapeDataString(storeId)));\n            }\n            if (baseUrl != null)\n            {\n                _queryParameters.Add(string.Format(\"baseUrl={0}\", System.Uri.EscapeDataString(baseUrl)));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<SitemapDownloadNotification>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<SitemapDownloadNotification>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// SitemapsModuleApiOperations operations.\n    /// </summary>\n    public partial interface ISitemapsModuleApiOperations\n    {\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<SitemapSearchResult>> SearchSitemapsWithHttpMessagesAsync(SitemapSearchCriteria body = default(SitemapSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='id'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Sitemap>> GetSitemapByIdWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> AddSitemapWithHttpMessagesAsync(Sitemap body = default(Sitemap), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> UpdateSitemapWithHttpMessagesAsync(Sitemap body = default(Sitemap), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='ids'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeleteSitemapWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<SitemapItemsSearchResult>> SearchSitemapItemsWithHttpMessagesAsync(SitemapItemSearchCriteria body = default(SitemapItemSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='sitemapId'>\n        /// </param>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse> AddSitemapItemsWithHttpMessagesAsync(string sitemapId, IList<SitemapItem> body = default(IList<SitemapItem>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='itemIds'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> RemoveSitemapItemsWithHttpMessagesAsync(IList<string> itemIds = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<string>>> GetSitemapsSchemaWithHttpMessagesAsync(string storeId = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='baseUrl'>\n        /// </param>\n        /// <param name='sitemapUrl'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<Stream>> GenerateSitemapWithHttpMessagesAsync(string storeId = default(string), string baseUrl = default(string), string sitemapUrl = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <param name='storeId'>\n        /// </param>\n        /// <param name='baseUrl'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<SitemapDownloadNotification>> DownloadSitemapWithHttpMessagesAsync(string storeId = default(string), string baseUrl = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for SitemapsModuleApiOperations.\n    /// </summary>\n    public static partial class SitemapsModuleApiOperationsExtensions\n    {\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static SitemapSearchResult SearchSitemaps(this ISitemapsModuleApiOperations operations, SitemapSearchCriteria body = default(SitemapSearchCriteria))\n            {\n                return operations.SearchSitemapsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SitemapSearchResult> SearchSitemapsAsync(this ISitemapsModuleApiOperations operations, SitemapSearchCriteria body = default(SitemapSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchSitemapsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// </param>\n            public static Sitemap GetSitemapById(this ISitemapsModuleApiOperations operations, string id)\n            {\n                return operations.GetSitemapByIdAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Sitemap> GetSitemapByIdAsync(this ISitemapsModuleApiOperations operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetSitemapByIdWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void AddSitemap(this ISitemapsModuleApiOperations operations, Sitemap body = default(Sitemap))\n            {\n                operations.AddSitemapAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task AddSitemapAsync(this ISitemapsModuleApiOperations operations, Sitemap body = default(Sitemap), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.AddSitemapWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void UpdateSitemap(this ISitemapsModuleApiOperations operations, Sitemap body = default(Sitemap))\n            {\n                operations.UpdateSitemapAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UpdateSitemapAsync(this ISitemapsModuleApiOperations operations, Sitemap body = default(Sitemap), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UpdateSitemapWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// </param>\n            public static void DeleteSitemap(this ISitemapsModuleApiOperations operations, IList<string> ids = default(IList<string>))\n            {\n                operations.DeleteSitemapAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteSitemapAsync(this ISitemapsModuleApiOperations operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteSitemapWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static SitemapItemsSearchResult SearchSitemapItems(this ISitemapsModuleApiOperations operations, SitemapItemSearchCriteria body = default(SitemapItemSearchCriteria))\n            {\n                return operations.SearchSitemapItemsAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SitemapItemsSearchResult> SearchSitemapItemsAsync(this ISitemapsModuleApiOperations operations, SitemapItemSearchCriteria body = default(SitemapItemSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchSitemapItemsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='sitemapId'>\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void AddSitemapItems(this ISitemapsModuleApiOperations operations, string sitemapId, IList<SitemapItem> body = default(IList<SitemapItem>))\n            {\n                operations.AddSitemapItemsAsync(sitemapId, body).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='sitemapId'>\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task AddSitemapItemsAsync(this ISitemapsModuleApiOperations operations, string sitemapId, IList<SitemapItem> body = default(IList<SitemapItem>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.AddSitemapItemsWithHttpMessagesAsync(sitemapId, body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='itemIds'>\n            /// </param>\n            public static void RemoveSitemapItems(this ISitemapsModuleApiOperations operations, IList<string> itemIds = default(IList<string>))\n            {\n                operations.RemoveSitemapItemsAsync(itemIds).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='itemIds'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task RemoveSitemapItemsAsync(this ISitemapsModuleApiOperations operations, IList<string> itemIds = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.RemoveSitemapItemsWithHttpMessagesAsync(itemIds, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            public static IList<string> GetSitemapsSchema(this ISitemapsModuleApiOperations operations, string storeId = default(string))\n            {\n                return operations.GetSitemapsSchemaAsync(storeId).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<string>> GetSitemapsSchemaAsync(this ISitemapsModuleApiOperations operations, string storeId = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetSitemapsSchemaWithHttpMessagesAsync(storeId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='baseUrl'>\n            /// </param>\n            /// <param name='sitemapUrl'>\n            /// </param>\n            public static Stream GenerateSitemap(this ISitemapsModuleApiOperations operations, string storeId = default(string), string baseUrl = default(string), string sitemapUrl = default(string))\n            {\n                return operations.GenerateSitemapAsync(storeId, baseUrl, sitemapUrl).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='baseUrl'>\n            /// </param>\n            /// <param name='sitemapUrl'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Stream> GenerateSitemapAsync(this ISitemapsModuleApiOperations operations, string storeId = default(string), string baseUrl = default(string), string sitemapUrl = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                var _result = await operations.GenerateSitemapWithHttpMessagesAsync(storeId, baseUrl, sitemapUrl, null, cancellationToken).ConfigureAwait(false);\n                _result.Request.Dispose();\n                return _result.Body;\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='baseUrl'>\n            /// </param>\n            public static SitemapDownloadNotification DownloadSitemap(this ISitemapsModuleApiOperations operations, string storeId = default(string), string baseUrl = default(string))\n            {\n                return operations.DownloadSitemapAsync(storeId, baseUrl).GetAwaiter().GetResult();\n            }\n\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// </param>\n            /// <param name='baseUrl'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<SitemapDownloadNotification> DownloadSitemapAsync(this ISitemapsModuleApiOperations operations, string storeId = default(string), string baseUrl = default(string), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.DownloadSitemapWithHttpMessagesAsync(storeId, baseUrl, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SitemapItemAlternateLinkRecord\n    {\n        /// <summary>\n        /// Initializes a new instance of the SitemapItemAlternateLinkRecord\n        /// class.\n        /// </summary>\n        public SitemapItemAlternateLinkRecord()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapItemAlternateLinkRecord\n        /// class.\n        /// </summary>\n        public SitemapItemAlternateLinkRecord(string url = default(string), string language = default(string), string type = default(string))\n        {\n            Url = url;\n            Language = language;\n            Type = type;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"url\")]\n        public string Url { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"language\")]\n        public string Language { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SitemapItemRecord\n    {\n        /// <summary>\n        /// Initializes a new instance of the SitemapItemRecord class.\n        /// </summary>\n        public SitemapItemRecord()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapItemRecord class.\n        /// </summary>\n        public SitemapItemRecord(string url = default(string), System.DateTime? modifiedDate = default(System.DateTime?), string updateFrequency = default(string), double? priority = default(double?), IList<SitemapItemAlternateLinkRecord> alternates = default(IList<SitemapItemAlternateLinkRecord>))\n        {\n            Url = url;\n            ModifiedDate = modifiedDate;\n            UpdateFrequency = updateFrequency;\n            Priority = priority;\n            Alternates = alternates;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"url\")]\n        public string Url { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"updateFrequency\")]\n        public string UpdateFrequency { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"priority\")]\n        public double? Priority { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"alternates\")]\n        public IList<SitemapItemAlternateLinkRecord> Alternates { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SitemapItem\n    {\n        /// <summary>\n        /// Initializes a new instance of the SitemapItem class.\n        /// </summary>\n        public SitemapItem()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapItem class.\n        /// </summary>\n        public SitemapItem(string sitemapId = default(string), string title = default(string), string imageUrl = default(string), string objectId = default(string), string objectType = default(string), string urlTemplate = default(string), IList<SitemapItemRecord> itemsRecords = default(IList<SitemapItemRecord>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            SitemapId = sitemapId;\n            Title = title;\n            ImageUrl = imageUrl;\n            ObjectId = objectId;\n            ObjectType = objectType;\n            UrlTemplate = urlTemplate;\n            ItemsRecords = itemsRecords;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sitemapId\")]\n        public string SitemapId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"title\")]\n        public string Title { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"imageUrl\")]\n        public string ImageUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"urlTemplate\")]\n        public string UrlTemplate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"itemsRecords\")]\n        public IList<SitemapItemRecord> ItemsRecords { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SortInfo\n    {\n        /// <summary>\n        /// Initializes a new instance of the SortInfo class.\n        /// </summary>\n        public SortInfo()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SortInfo class.\n        /// </summary>\n        /// <param name=\"sortDirection\">Possible values include: 'Ascending',\n        /// 'Descending'</param>\n        public SortInfo(string sortColumn = default(string), string sortDirection = default(string))\n        {\n            SortColumn = sortColumn;\n            SortDirection = sortDirection;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortColumn\")]\n        public string SortColumn { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Ascending', 'Descending'\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortDirection\")]\n        public string SortDirection { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SitemapSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the SitemapSearchCriteria class.\n        /// </summary>\n        public SitemapSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapSearchCriteria class.\n        /// </summary>\n        public SitemapSearchCriteria(string storeId = default(string), string location = default(string), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            StoreId = storeId;\n            Location = location;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeId\")]\n        public string StoreId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"location\")]\n        public string Location { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Sitemap\n    {\n        /// <summary>\n        /// Initializes a new instance of the Sitemap class.\n        /// </summary>\n        public Sitemap()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Sitemap class.\n        /// </summary>\n        public Sitemap(string location = default(string), string storeId = default(string), IList<SitemapItem> items = default(IList<SitemapItem>), string urlTemplate = default(string), int? totalItemsCount = default(int?), IList<string> pagedLocations = default(IList<string>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Location = location;\n            StoreId = storeId;\n            Items = items;\n            UrlTemplate = urlTemplate;\n            TotalItemsCount = totalItemsCount;\n            PagedLocations = pagedLocations;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"location\")]\n        public string Location { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeId\")]\n        public string StoreId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"items\")]\n        public IList<SitemapItem> Items { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"urlTemplate\")]\n        public string UrlTemplate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalItemsCount\")]\n        public int? TotalItemsCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"pagedLocations\")]\n        public IList<string> PagedLocations { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SitemapSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the SitemapSearchResult class.\n        /// </summary>\n        public SitemapSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapSearchResult class.\n        /// </summary>\n        public SitemapSearchResult(int? totalCount = default(int?), IList<Sitemap> results = default(IList<Sitemap>))\n        {\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<Sitemap> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SitemapItemSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the SitemapItemSearchCriteria class.\n        /// </summary>\n        public SitemapItemSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapItemSearchCriteria class.\n        /// </summary>\n        public SitemapItemSearchCriteria(string sitemapId = default(string), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            SitemapId = sitemapId;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sitemapId\")]\n        public string SitemapId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SitemapItemsSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the SitemapItemsSearchResult class.\n        /// </summary>\n        public SitemapItemsSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapItemsSearchResult class.\n        /// </summary>\n        public SitemapItemsSearchResult(int? totalCount = default(int?), IList<SitemapItem> results = default(IList<SitemapItem>))\n        {\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<SitemapItem> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SitemapDownloadNotification\n    {\n        /// <summary>\n        /// Initializes a new instance of the SitemapDownloadNotification\n        /// class.\n        /// </summary>\n        public SitemapDownloadNotification()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SitemapDownloadNotification\n        /// class.\n        /// </summary>\n        public SitemapDownloadNotification(System.DateTime? finished = default(System.DateTime?), long? totalCount = default(long?), long? processedCount = default(long?), long? errorCount = default(long?), IList<string> errors = default(IList<string>), string downloadUrl = default(string), string creator = default(string), System.DateTime? created = default(System.DateTime?), bool? isNew = default(bool?), string notifyType = default(string), string description = default(string), string title = default(string), int? repeatCount = default(int?), string id = default(string))\n        {\n            Finished = finished;\n            TotalCount = totalCount;\n            ProcessedCount = processedCount;\n            ErrorCount = errorCount;\n            Errors = errors;\n            DownloadUrl = downloadUrl;\n            Creator = creator;\n            Created = created;\n            IsNew = isNew;\n            NotifyType = notifyType;\n            Description = description;\n            Title = title;\n            RepeatCount = repeatCount;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"finished\")]\n        public System.DateTime? Finished { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public long? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"processedCount\")]\n        public long? ProcessedCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"errorCount\")]\n        public long? ErrorCount { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"errors\")]\n        public IList<string> Errors { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"downloadUrl\")]\n        public string DownloadUrl { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"creator\")]\n        public string Creator { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"created\")]\n        public System.DateTime? Created { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isNew\")]\n        public bool? IsNew { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"notifyType\")]\n        public string NotifyType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"title\")]\n        public string Title { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"repeatCount\")]\n        public int? RepeatCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/AutoRestClients/StoreModuleApi.cs",
    "content": "// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class StoreModuleClient : ServiceClient<StoreModuleClient>, IStoreModuleClient\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        public System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        public JsonSerializerSettings SerializationSettings { get; private set; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        public JsonSerializerSettings DeserializationSettings { get; private set; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client subscription.\n        /// </summary>\n        public ServiceClientCredentials Credentials { get; private set; }\n\n        /// <summary>\n        /// Gets the IStoreModule.\n        /// </summary>\n        public virtual IStoreModule StoreModule { get; private set; }\n\n        /// <summary>\n        /// Initializes a new instance of the StoreModuleClient class.\n        /// </summary>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling StoreModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        protected StoreModuleClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the StoreModuleClient class.\n        /// </summary>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected StoreModuleClient(params DelegatingHandler[] handlers) : base(handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the StoreModuleClient class.\n        /// </summary>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        protected StoreModuleClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)\n        {\n            Initialize();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the StoreModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected StoreModuleClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the StoreModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        protected StoreModuleClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            BaseUri = baseUri;\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the StoreModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public StoreModuleClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the StoreModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='httpClient'>\n        /// HttpClient to be used\n        /// </param>\n        /// <param name='disposeHttpClient'>\n        /// True: will dispose the provided httpClient on calling StoreModuleClient.Dispose(). False: will not dispose provided httpClient</param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public StoreModuleClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the StoreModuleClient class.\n        /// </summary>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public StoreModuleClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the StoreModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public StoreModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the StoreModuleClient class.\n        /// </summary>\n        /// <param name='baseUri'>\n        /// Optional. The base URI of the service.\n        /// </param>\n        /// <param name='credentials'>\n        /// Required. Subscription credentials which uniquely identify client subscription.\n        /// </param>\n        /// <param name='rootHandler'>\n        /// Optional. The http client handler used to handle http transport.\n        /// </param>\n        /// <param name='handlers'>\n        /// Optional. The delegating handlers to add to the http client pipeline.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public StoreModuleClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)\n        {\n            if (baseUri == null)\n            {\n                throw new System.ArgumentNullException(\"baseUri\");\n            }\n            if (credentials == null)\n            {\n                throw new System.ArgumentNullException(\"credentials\");\n            }\n            BaseUri = baseUri;\n            Credentials = credentials;\n            if (Credentials != null)\n            {\n                Credentials.InitializeServiceClient(this);\n            }\n        }\n\n        /// <summary>\n        /// An optional partial-method to perform custom initialization.\n        ///</summary>\n        partial void CustomInitialize();\n        /// <summary>\n        /// Initializes client properties.\n        /// </summary>\n        private void Initialize()\n        {\n            StoreModule = new StoreModule(this);\n            BaseUri = new System.Uri(\"http://localhost\");\n            SerializationSettings = new JsonSerializerSettings\n            {\n                Formatting = Newtonsoft.Json.Formatting.Indented,\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new  List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            DeserializationSettings = new JsonSerializerSettings\n            {\n                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,\n                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,\n                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,\n                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,\n                ContractResolver = new ReadOnlyJsonContractResolver(),\n                Converters = new List<JsonConverter>\n                    {\n                        new Iso8601TimeSpanConverter()\n                    }\n            };\n            CustomInitialize();\n        }\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// </summary>\n    public partial interface IStoreModuleClient : System.IDisposable\n    {\n        /// <summary>\n        /// The base URI of the service.\n        /// </summary>\n        System.Uri BaseUri { get; set; }\n\n        /// <summary>\n        /// Gets or sets json serialization settings.\n        /// </summary>\n        JsonSerializerSettings SerializationSettings { get; }\n\n        /// <summary>\n        /// Gets or sets json deserialization settings.\n        /// </summary>\n        JsonSerializerSettings DeserializationSettings { get; }\n\n        /// <summary>\n        /// Subscription credentials which uniquely identify client\n        /// subscription.\n        /// </summary>\n        ServiceClientCredentials Credentials { get; }\n\n\n        /// <summary>\n        /// Gets the IStoreModule.\n        /// </summary>\n        IStoreModule StoreModule { get; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.IO;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// StoreModule operations.\n    /// </summary>\n    public partial class StoreModule : IServiceOperations<StoreModuleClient>, IStoreModule\n    {\n        /// <summary>\n        /// Initializes a new instance of the StoreModule class.\n        /// </summary>\n        /// <param name='client'>\n        /// Reference to the service client.\n        /// </param>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        public StoreModule(StoreModuleClient client)\n        {\n            if (client == null)\n            {\n                throw new System.ArgumentNullException(\"client\");\n            }\n            Client = client;\n        }\n\n        /// <summary>\n        /// Gets a reference to the StoreModuleClient\n        /// </summary>\n        public StoreModuleClient Client { get; private set; }\n\n        /// <summary>\n        /// Search stores\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<StoreSearchResult>> SearchStoresWithHttpMessagesAsync(StoreSearchCriteria body = default(StoreSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SearchStores\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/stores/search\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<StoreSearchResult>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<StoreSearchResult>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get all stores\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Store>>> GetStoresWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetStores\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/stores\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Store>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Store>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Create store\n        /// </summary>\n        /// <param name='body'>\n        /// Store\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Store>> CreateStoreWithHttpMessagesAsync(Store body = default(Store), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"CreateStore\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/stores\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Store>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Store>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Update store\n        /// </summary>\n        /// <param name='body'>\n        /// Store\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> UpdateStoreWithHttpMessagesAsync(Store body = default(Store), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"UpdateStore\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/stores\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"PUT\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Delete stores\n        /// </summary>\n        /// <param name='ids'>\n        /// Ids of store that needed to delete\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> DeleteStoreWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"ids\", ids);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"DeleteStore\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/stores\").ToString();\n            List<string> _queryParameters = new List<string>();\n            if (ids != null)\n            {\n                _queryParameters.Add(string.Format(\"ids={0}\", System.Uri.EscapeDataString(string.Join(\",\", ids))));\n            }\n            if (_queryParameters.Count > 0)\n            {\n                _url += \"?\" + string.Join(\"&\", _queryParameters);\n            }\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"DELETE\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Get store by id\n        /// </summary>\n        /// <param name='id'>\n        /// Store id\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<Store>> GetStoreByIdWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetStoreById\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/stores/{id}\").ToString();\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<Store>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<Store>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Send dynamic notification (contains custom list of properties) to store or\n        /// administrator email\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse> SendDynamicNotificationAnStoreEmailWithHttpMessagesAsync(SendDynamicNotificationRequest body = default(SendDynamicNotificationRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"body\", body);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"SendDynamicNotificationAnStoreEmail\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/stores/send/dynamicnotification\").ToString();\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"POST\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            if(body != null)\n            {\n                _requestContent = SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);\n                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);\n                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(\"application/json-patch+json; charset=utf-8\");\n            }\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 204 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Check if given contact has login on behalf permission\n        /// </summary>\n        /// <param name='storeId'>\n        /// Store ID\n        /// </param>\n        /// <param name='id'>\n        /// Contact ID\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<LoginOnBehalfInfo>> GetLoginOnBehalfInfoWithHttpMessagesAsync(string storeId, string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (storeId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"storeId\");\n            }\n            if (id == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"id\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"storeId\", storeId);\n                tracingParameters.Add(\"id\", id);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetLoginOnBehalfInfo\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/stores/{storeId}/accounts/{id}/loginonbehalf\").ToString();\n            _url = _url.Replace(\"{storeId}\", System.Uri.EscapeDataString(storeId));\n            _url = _url.Replace(\"{id}\", System.Uri.EscapeDataString(id));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<LoginOnBehalfInfo>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<LoginOnBehalfInfo>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n        /// <summary>\n        /// Returns list of stores which user can sign in\n        /// </summary>\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// Headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <exception cref=\"System.ArgumentNullException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        /// <return>\n        /// A response object containing the response body and response headers.\n        /// </return>\n        public async Task<HttpOperationResponse<IList<Store>>> GetUserAllowedStoresWithHttpMessagesAsync(string userId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))\n        {\n            if (userId == null)\n            {\n                throw new ValidationException(ValidationRules.CannotBeNull, \"userId\");\n            }\n            // Tracing\n            bool _shouldTrace = ServiceClientTracing.IsEnabled;\n            string _invocationId = null;\n            if (_shouldTrace)\n            {\n                _invocationId = ServiceClientTracing.NextInvocationId.ToString();\n                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();\n                tracingParameters.Add(\"userId\", userId);\n                tracingParameters.Add(\"cancellationToken\", cancellationToken);\n                ServiceClientTracing.Enter(_invocationId, this, \"GetUserAllowedStores\", tracingParameters);\n            }\n            // Construct URL\n            var _baseUrl = Client.BaseUri.AbsoluteUri;\n            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith(\"/\") ? \"\" : \"/\")), \"api/stores/allowed/{userId}\").ToString();\n            _url = _url.Replace(\"{userId}\", System.Uri.EscapeDataString(userId));\n            // Create HTTP transport objects\n            var _httpRequest = new HttpRequestMessage();\n            HttpResponseMessage _httpResponse = null;\n            _httpRequest.Method = new HttpMethod(\"GET\");\n            _httpRequest.RequestUri = new System.Uri(_url);\n            // Set Headers\n\n\n            if (customHeaders != null)\n            {\n                foreach(var _header in customHeaders)\n                {\n                    if (_httpRequest.Headers.Contains(_header.Key))\n                    {\n                        _httpRequest.Headers.Remove(_header.Key);\n                    }\n                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);\n                }\n            }\n\n            // Serialize Request\n            string _requestContent = null;\n            // Set Credentials\n            if (Client.Credentials != null)\n            {\n                cancellationToken.ThrowIfCancellationRequested();\n                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            }\n            // Send Request\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);\n            }\n            cancellationToken.ThrowIfCancellationRequested();\n            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);\n            }\n            HttpStatusCode _statusCode = _httpResponse.StatusCode;\n            cancellationToken.ThrowIfCancellationRequested();\n            string _responseContent = null;\n            if ((int)_statusCode != 200 && (int)_statusCode != 401 && (int)_statusCode != 403)\n            {\n                var ex = new HttpOperationException(string.Format(\"Operation returned an invalid status code '{0}'\", _statusCode));\n                if (_httpResponse.Content != null) {\n                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                }\n                else {\n                    _responseContent = string.Empty;\n                }\n                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);\n                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);\n                if (_shouldTrace)\n                {\n                    ServiceClientTracing.Error(_invocationId, ex);\n                }\n                _httpRequest.Dispose();\n                if (_httpResponse != null)\n                {\n                    _httpResponse.Dispose();\n                }\n                throw ex;\n            }\n            // Create Result\n            var _result = new HttpOperationResponse<IList<Store>>();\n            _result.Request = _httpRequest;\n            _result.Response = _httpResponse;\n            // Deserialize Response\n            if ((int)_statusCode == 200)\n            {\n                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);\n                try\n                {\n                    _result.Body = SafeJsonConvert.DeserializeObject<IList<Store>>(_responseContent, Client.DeserializationSettings);\n                }\n                catch (JsonException ex)\n                {\n                    _httpRequest.Dispose();\n                    if (_httpResponse != null)\n                    {\n                        _httpResponse.Dispose();\n                    }\n                    throw new SerializationException(\"Unable to deserialize the response.\", _responseContent, ex);\n                }\n            }\n            if (_shouldTrace)\n            {\n                ServiceClientTracing.Exit(_invocationId, _result);\n            }\n            return _result;\n        }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// StoreModule operations.\n    /// </summary>\n    public partial interface IStoreModule\n    {\n        /// <summary>\n        /// Search stores\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<StoreSearchResult>> SearchStoresWithHttpMessagesAsync(StoreSearchCriteria body = default(StoreSearchCriteria), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get all stores\n        /// </summary>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<IList<Store>>> GetStoresWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Create store\n        /// </summary>\n        /// <param name='body'>\n        /// Store\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        Task<HttpOperationResponse<Store>> CreateStoreWithHttpMessagesAsync(Store body = default(Store), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Update store\n        /// </summary>\n        /// <param name='body'>\n        /// Store\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> UpdateStoreWithHttpMessagesAsync(Store body = default(Store), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Delete stores\n        /// </summary>\n        /// <param name='ids'>\n        /// Ids of store that needed to delete\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> DeleteStoreWithHttpMessagesAsync(IList<string> ids = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Get store by id\n        /// </summary>\n        /// <param name='id'>\n        /// Store id\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<Store>> GetStoreByIdWithHttpMessagesAsync(string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Send dynamic notification (contains custom list of properties) to\n        /// store or administrator email\n        /// </summary>\n        /// <param name='body'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        Task<HttpOperationResponse> SendDynamicNotificationAnStoreEmailWithHttpMessagesAsync(SendDynamicNotificationRequest body = default(SendDynamicNotificationRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Check if given contact has login on behalf permission\n        /// </summary>\n        /// <param name='storeId'>\n        /// Store ID\n        /// </param>\n        /// <param name='id'>\n        /// Contact ID\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<LoginOnBehalfInfo>> GetLoginOnBehalfInfoWithHttpMessagesAsync(string storeId, string id, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n        /// <summary>\n        /// Returns list of stores which user can sign in\n        /// </summary>\n        /// <param name='userId'>\n        /// </param>\n        /// <param name='customHeaders'>\n        /// The headers that will be added to request.\n        /// </param>\n        /// <param name='cancellationToken'>\n        /// The cancellation token.\n        /// </param>\n        /// <exception cref=\"Microsoft.Rest.HttpOperationException\">\n        /// Thrown when the operation returned an invalid status code\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.SerializationException\">\n        /// Thrown when unable to deserialize the response\n        /// </exception>\n        /// <exception cref=\"Microsoft.Rest.ValidationException\">\n        /// Thrown when a required parameter is null\n        /// </exception>\n        Task<HttpOperationResponse<IList<Store>>> GetUserAllowedStoresWithHttpMessagesAsync(string userId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Models;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Extension methods for StoreModule.\n    /// </summary>\n    public static partial class StoreModuleExtensions\n    {\n            /// <summary>\n            /// Search stores\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static StoreSearchResult SearchStores(this IStoreModule operations, StoreSearchCriteria body = default(StoreSearchCriteria))\n            {\n                return operations.SearchStoresAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Search stores\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<StoreSearchResult> SearchStoresAsync(this IStoreModule operations, StoreSearchCriteria body = default(StoreSearchCriteria), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.SearchStoresWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Get all stores\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            public static IList<Store> GetStores(this IStoreModule operations)\n            {\n                return operations.GetStoresAsync().GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get all stores\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Store>> GetStoresAsync(this IStoreModule operations, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetStoresWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Create store\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Store\n            /// </param>\n            public static Store CreateStore(this IStoreModule operations, Store body = default(Store))\n            {\n                return operations.CreateStoreAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Create store\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Store\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Store> CreateStoreAsync(this IStoreModule operations, Store body = default(Store), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.CreateStoreWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Update store\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Store\n            /// </param>\n            public static void UpdateStore(this IStoreModule operations, Store body = default(Store))\n            {\n                operations.UpdateStoreAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Update store\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// Store\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task UpdateStoreAsync(this IStoreModule operations, Store body = default(Store), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.UpdateStoreWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Delete stores\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// Ids of store that needed to delete\n            /// </param>\n            public static void DeleteStore(this IStoreModule operations, IList<string> ids = default(IList<string>))\n            {\n                operations.DeleteStoreAsync(ids).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Delete stores\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='ids'>\n            /// Ids of store that needed to delete\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task DeleteStoreAsync(this IStoreModule operations, IList<string> ids = default(IList<string>), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.DeleteStoreWithHttpMessagesAsync(ids, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Get store by id\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Store id\n            /// </param>\n            public static Store GetStoreById(this IStoreModule operations, string id)\n            {\n                return operations.GetStoreByIdAsync(id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Get store by id\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='id'>\n            /// Store id\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<Store> GetStoreByIdAsync(this IStoreModule operations, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetStoreByIdWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Send dynamic notification (contains custom list of properties) to store or\n            /// administrator email\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            public static void SendDynamicNotificationAnStoreEmail(this IStoreModule operations, SendDynamicNotificationRequest body = default(SendDynamicNotificationRequest))\n            {\n                operations.SendDynamicNotificationAnStoreEmailAsync(body).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Send dynamic notification (contains custom list of properties) to store or\n            /// administrator email\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='body'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task SendDynamicNotificationAnStoreEmailAsync(this IStoreModule operations, SendDynamicNotificationRequest body = default(SendDynamicNotificationRequest), CancellationToken cancellationToken = default(CancellationToken))\n            {\n                (await operations.SendDynamicNotificationAnStoreEmailWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();\n            }\n\n            /// <summary>\n            /// Check if given contact has login on behalf permission\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// Store ID\n            /// </param>\n            /// <param name='id'>\n            /// Contact ID\n            /// </param>\n            public static LoginOnBehalfInfo GetLoginOnBehalfInfo(this IStoreModule operations, string storeId, string id)\n            {\n                return operations.GetLoginOnBehalfInfoAsync(storeId, id).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Check if given contact has login on behalf permission\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='storeId'>\n            /// Store ID\n            /// </param>\n            /// <param name='id'>\n            /// Contact ID\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<LoginOnBehalfInfo> GetLoginOnBehalfInfoAsync(this IStoreModule operations, string storeId, string id, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetLoginOnBehalfInfoWithHttpMessagesAsync(storeId, id, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n            /// <summary>\n            /// Returns list of stores which user can sign in\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            public static IList<Store> GetUserAllowedStores(this IStoreModule operations, string userId)\n            {\n                return operations.GetUserAllowedStoresAsync(userId).GetAwaiter().GetResult();\n            }\n\n            /// <summary>\n            /// Returns list of stores which user can sign in\n            /// </summary>\n            /// <param name='operations'>\n            /// The operations group for this extension method.\n            /// </param>\n            /// <param name='userId'>\n            /// </param>\n            /// <param name='cancellationToken'>\n            /// The cancellation token.\n            /// </param>\n            public static async Task<IList<Store>> GetUserAllowedStoresAsync(this IStoreModule operations, string userId, CancellationToken cancellationToken = default(CancellationToken))\n            {\n                using (var _result = await operations.GetUserAllowedStoresWithHttpMessagesAsync(userId, null, cancellationToken).ConfigureAwait(false))\n                {\n                    return _result.Body;\n                }\n            }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicPropertyName\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyName class.\n        /// </summary>\n        public DynamicPropertyName()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyName class.\n        /// </summary>\n        public DynamicPropertyName(string locale = default(string), string name = default(string))\n        {\n            Locale = locale;\n            Name = name;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"locale\")]\n        public string Locale { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SeoInfo\n    {\n        /// <summary>\n        /// Initializes a new instance of the SeoInfo class.\n        /// </summary>\n        public SeoInfo()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SeoInfo class.\n        /// </summary>\n        /// <param name=\"semanticUrl\">Slug</param>\n        /// <param name=\"pageTitle\">head title tag content</param>\n        /// <param name=\"metaDescription\">&lt;meta name=\"description\"\n        /// /&gt;</param>\n        /// <param name=\"metaKeywords\">&lt;meta name=\"keywords\" /&gt;</param>\n        /// <param name=\"storeId\">Tenant StoreId which SEO defined</param>\n        /// <param name=\"objectId\">SEO related object id</param>\n        /// <param name=\"objectType\">SEO related object type name</param>\n        /// <param name=\"isActive\">Active/Inactive</param>\n        public SeoInfo(string name = default(string), string semanticUrl = default(string), string pageTitle = default(string), string metaDescription = default(string), string imageAltDescription = default(string), string metaKeywords = default(string), string storeId = default(string), string objectId = default(string), string objectType = default(string), bool? isActive = default(bool?), string languageCode = default(string), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Name = name;\n            SemanticUrl = semanticUrl;\n            PageTitle = pageTitle;\n            MetaDescription = metaDescription;\n            ImageAltDescription = imageAltDescription;\n            MetaKeywords = metaKeywords;\n            StoreId = storeId;\n            ObjectId = objectId;\n            ObjectType = objectType;\n            IsActive = isActive;\n            LanguageCode = languageCode;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Gets or sets slug\n        /// </summary>\n        [JsonProperty(PropertyName = \"semanticUrl\")]\n        public string SemanticUrl { get; set; }\n\n        /// <summary>\n        /// Gets or sets head title tag content\n        /// </summary>\n        [JsonProperty(PropertyName = \"pageTitle\")]\n        public string PageTitle { get; set; }\n\n        /// <summary>\n        /// Gets or sets &amp;lt;meta name=\"description\" /&amp;gt;\n        /// </summary>\n        [JsonProperty(PropertyName = \"metaDescription\")]\n        public string MetaDescription { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"imageAltDescription\")]\n        public string ImageAltDescription { get; set; }\n\n        /// <summary>\n        /// Gets or sets &amp;lt;meta name=\"keywords\" /&amp;gt;\n        /// </summary>\n        [JsonProperty(PropertyName = \"metaKeywords\")]\n        public string MetaKeywords { get; set; }\n\n        /// <summary>\n        /// Gets or sets tenant StoreId which SEO defined\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeId\")]\n        public string StoreId { get; set; }\n\n        /// <summary>\n        /// Gets or sets SEO related object id\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// Gets or sets SEO related object type name\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// Gets or sets active/Inactive\n        /// </summary>\n        [JsonProperty(PropertyName = \"isActive\")]\n        public bool? IsActive { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicPropertyObjectValue\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyObjectValue class.\n        /// </summary>\n        public DynamicPropertyObjectValue()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the DynamicPropertyObjectValue class.\n        /// </summary>\n        /// <param name=\"valueType\">Possible values include: 'Undefined',\n        /// 'ShortText', 'LongText', 'Integer', 'Decimal', 'DateTime',\n        /// 'Boolean', 'Html', 'Image'</param>\n        public DynamicPropertyObjectValue(string objectType = default(string), string objectId = default(string), string locale = default(string), object value = default(object), string valueId = default(string), string valueType = default(string), string propertyId = default(string), string propertyName = default(string))\n        {\n            ObjectType = objectType;\n            ObjectId = objectId;\n            Locale = locale;\n            Value = value;\n            ValueId = valueId;\n            ValueType = valueType;\n            PropertyId = propertyId;\n            PropertyName = propertyName;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"locale\")]\n        public string Locale { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"value\")]\n        public object Value { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueId\")]\n        public string ValueId { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Undefined', 'ShortText',\n        /// 'LongText', 'Integer', 'Decimal', 'DateTime', 'Boolean', 'Html',\n        /// 'Image'\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueType\")]\n        public string ValueType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyId\")]\n        public string PropertyId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"propertyName\")]\n        public string PropertyName { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class DynamicObjectProperty\n    {\n        /// <summary>\n        /// Initializes a new instance of the DynamicObjectProperty class.\n        /// </summary>\n        public DynamicObjectProperty()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the DynamicObjectProperty class.\n        /// </summary>\n        /// <param name=\"valueType\">Possible values include: 'Undefined',\n        /// 'ShortText', 'LongText', 'Integer', 'Decimal', 'DateTime',\n        /// 'Boolean', 'Html', 'Image'</param>\n        public DynamicObjectProperty(string objectId = default(string), IList<DynamicPropertyObjectValue> values = default(IList<DynamicPropertyObjectValue>), string name = default(string), string description = default(string), string objectType = default(string), bool? isArray = default(bool?), bool? isDictionary = default(bool?), bool? isMultilingual = default(bool?), bool? isRequired = default(bool?), int? displayOrder = default(int?), string valueType = default(string), IList<DynamicPropertyName> displayNames = default(IList<DynamicPropertyName>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            ObjectId = objectId;\n            Values = values;\n            Name = name;\n            Description = description;\n            ObjectType = objectType;\n            IsArray = isArray;\n            IsDictionary = isDictionary;\n            IsMultilingual = isMultilingual;\n            IsRequired = isRequired;\n            DisplayOrder = displayOrder;\n            ValueType = valueType;\n            DisplayNames = displayNames;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"values\")]\n        public IList<DynamicPropertyObjectValue> Values { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isArray\")]\n        public bool? IsArray { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isDictionary\")]\n        public bool? IsDictionary { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isMultilingual\")]\n        public bool? IsMultilingual { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isRequired\")]\n        public bool? IsRequired { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayOrder\")]\n        public int? DisplayOrder { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Undefined', 'ShortText',\n        /// 'LongText', 'Integer', 'Decimal', 'DateTime', 'Boolean', 'Html',\n        /// 'Image'\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueType\")]\n        public string ValueType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayNames\")]\n        public IList<DynamicPropertyName> DisplayNames { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class ObjectSettingEntry\n    {\n        /// <summary>\n        /// Initializes a new instance of the ObjectSettingEntry class.\n        /// </summary>\n        public ObjectSettingEntry()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the ObjectSettingEntry class.\n        /// </summary>\n        /// <param name=\"valueType\">Possible values include: 'ShortText',\n        /// 'LongText', 'Integer', 'Decimal', 'DateTime', 'Boolean',\n        /// 'SecureString', 'Json'</param>\n        public ObjectSettingEntry(bool? itHasValues = default(bool?), string objectId = default(string), string objectType = default(string), object value = default(object), bool? restartRequired = default(bool?), string moduleId = default(string), string groupName = default(string), string name = default(string), string valueType = default(string), IList<object> allowedValues = default(IList<object>), object defaultValue = default(object), bool? isDictionary = default(bool?))\n        {\n            ItHasValues = itHasValues;\n            ObjectId = objectId;\n            ObjectType = objectType;\n            Value = value;\n            RestartRequired = restartRequired;\n            ModuleId = moduleId;\n            GroupName = groupName;\n            Name = name;\n            ValueType = valueType;\n            AllowedValues = allowedValues;\n            DefaultValue = defaultValue;\n            IsDictionary = isDictionary;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"itHasValues\")]\n        public bool? ItHasValues { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectId\")]\n        public string ObjectId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"value\")]\n        public object Value { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"restartRequired\")]\n        public bool? RestartRequired { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"moduleId\")]\n        public string ModuleId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"groupName\")]\n        public string GroupName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'ShortText', 'LongText',\n        /// 'Integer', 'Decimal', 'DateTime', 'Boolean', 'SecureString', 'Json'\n        /// </summary>\n        [JsonProperty(PropertyName = \"valueType\")]\n        public string ValueType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"allowedValues\")]\n        public IList<object> AllowedValues { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"defaultValue\")]\n        public object DefaultValue { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"isDictionary\")]\n        public bool? IsDictionary { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class Store\n    {\n        /// <summary>\n        /// Initializes a new instance of the Store class.\n        /// </summary>\n        public Store()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the Store class.\n        /// </summary>\n        /// <param name=\"storeState\">Possible values include: 'Open', 'Closed',\n        /// 'RestrictedAccess'</param>\n        /// <param name=\"catalog\">Catalog id used as primary store\n        /// catalog</param>\n        /// <param name=\"url\">Store storefront url</param>\n        /// <param name=\"secureUrl\">Store storefront https url</param>\n        /// <param name=\"email\">Primary store contact email can be used for\n        /// store event notifications and for feed back</param>\n        /// <param name=\"mainFulfillmentCenterId\">Primary (default) fulfillment\n        /// center id</param>\n        /// <param name=\"additionalFulfillmentCenterIds\">Alternate fulfillment\n        /// centers ids</param>\n        /// <param name=\"mainReturnsFulfillmentCenterId\">Primary (default)\n        /// fulfillment center for order return</param>\n        /// <param name=\"returnsFulfillmentCenterIds\">Alternate fulfillment\n        /// centers for order return</param>\n        /// <param name=\"languages\">All store supported languages</param>\n        /// <param name=\"currencies\">All store supported currencies</param>\n        /// <param name=\"trustedGroups\">All store trusted groups (group of\n        /// stores that shared the user logins)</param>\n        public Store(string name = default(string), string description = default(string), string storeState = default(string), string timeZone = default(string), string country = default(string), string region = default(string), string defaultLanguage = default(string), string defaultCurrency = default(string), string catalog = default(string), bool? creditCardSavePolicy = default(bool?), string url = default(string), string secureUrl = default(string), string email = default(string), string adminEmail = default(string), bool? displayOutOfStock = default(bool?), string outerId = default(string), string mainFulfillmentCenterId = default(string), IList<string> additionalFulfillmentCenterIds = default(IList<string>), string mainReturnsFulfillmentCenterId = default(string), IList<string> returnsFulfillmentCenterIds = default(IList<string>), IList<string> languages = default(IList<string>), IList<string> currencies = default(IList<string>), IList<string> trustedGroups = default(IList<string>), string seoObjectType = default(string), IList<SeoInfo> seoInfos = default(IList<SeoInfo>), string objectType = default(string), IList<DynamicObjectProperty> dynamicProperties = default(IList<DynamicObjectProperty>), IList<ObjectSettingEntry> settings = default(IList<ObjectSettingEntry>), string typeName = default(string), IList<string> scopes = default(IList<string>), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? modifiedDate = default(System.DateTime?), string createdBy = default(string), string modifiedBy = default(string), string id = default(string))\n        {\n            Name = name;\n            Description = description;\n            StoreState = storeState;\n            TimeZone = timeZone;\n            Country = country;\n            Region = region;\n            DefaultLanguage = defaultLanguage;\n            DefaultCurrency = defaultCurrency;\n            Catalog = catalog;\n            CreditCardSavePolicy = creditCardSavePolicy;\n            Url = url;\n            SecureUrl = secureUrl;\n            Email = email;\n            AdminEmail = adminEmail;\n            DisplayOutOfStock = displayOutOfStock;\n            OuterId = outerId;\n            MainFulfillmentCenterId = mainFulfillmentCenterId;\n            AdditionalFulfillmentCenterIds = additionalFulfillmentCenterIds;\n            MainReturnsFulfillmentCenterId = mainReturnsFulfillmentCenterId;\n            ReturnsFulfillmentCenterIds = returnsFulfillmentCenterIds;\n            Languages = languages;\n            Currencies = currencies;\n            TrustedGroups = trustedGroups;\n            SeoObjectType = seoObjectType;\n            SeoInfos = seoInfos;\n            ObjectType = objectType;\n            DynamicProperties = dynamicProperties;\n            Settings = settings;\n            TypeName = typeName;\n            Scopes = scopes;\n            CreatedDate = createdDate;\n            ModifiedDate = modifiedDate;\n            CreatedBy = createdBy;\n            ModifiedBy = modifiedBy;\n            Id = id;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"name\")]\n        public string Name { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"description\")]\n        public string Description { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Open', 'Closed',\n        /// 'RestrictedAccess'\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeState\")]\n        public string StoreState { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"timeZone\")]\n        public string TimeZone { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"country\")]\n        public string Country { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"region\")]\n        public string Region { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"defaultLanguage\")]\n        public string DefaultLanguage { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"defaultCurrency\")]\n        public string DefaultCurrency { get; set; }\n\n        /// <summary>\n        /// Gets or sets catalog id used as primary store catalog\n        /// </summary>\n        [JsonProperty(PropertyName = \"catalog\")]\n        public string Catalog { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"creditCardSavePolicy\")]\n        public bool? CreditCardSavePolicy { get; set; }\n\n        /// <summary>\n        /// Gets or sets store storefront url\n        /// </summary>\n        [JsonProperty(PropertyName = \"url\")]\n        public string Url { get; set; }\n\n        /// <summary>\n        /// Gets or sets store storefront https url\n        /// </summary>\n        [JsonProperty(PropertyName = \"secureUrl\")]\n        public string SecureUrl { get; set; }\n\n        /// <summary>\n        /// Gets or sets primary store contact email can be used for store\n        /// event notifications and for feed back\n        /// </summary>\n        [JsonProperty(PropertyName = \"email\")]\n        public string Email { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"adminEmail\")]\n        public string AdminEmail { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"displayOutOfStock\")]\n        public bool? DisplayOutOfStock { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"outerId\")]\n        public string OuterId { get; set; }\n\n        /// <summary>\n        /// Gets or sets primary (default) fulfillment center id\n        /// </summary>\n        [JsonProperty(PropertyName = \"mainFulfillmentCenterId\")]\n        public string MainFulfillmentCenterId { get; set; }\n\n        /// <summary>\n        /// Gets or sets alternate fulfillment centers ids\n        /// </summary>\n        [JsonProperty(PropertyName = \"additionalFulfillmentCenterIds\")]\n        public IList<string> AdditionalFulfillmentCenterIds { get; set; }\n\n        /// <summary>\n        /// Gets or sets primary (default) fulfillment center for order return\n        /// </summary>\n        [JsonProperty(PropertyName = \"mainReturnsFulfillmentCenterId\")]\n        public string MainReturnsFulfillmentCenterId { get; set; }\n\n        /// <summary>\n        /// Gets or sets alternate fulfillment centers for order return\n        /// </summary>\n        [JsonProperty(PropertyName = \"returnsFulfillmentCenterIds\")]\n        public IList<string> ReturnsFulfillmentCenterIds { get; set; }\n\n        /// <summary>\n        /// Gets or sets all store supported languages\n        /// </summary>\n        [JsonProperty(PropertyName = \"languages\")]\n        public IList<string> Languages { get; set; }\n\n        /// <summary>\n        /// Gets or sets all store supported currencies\n        /// </summary>\n        [JsonProperty(PropertyName = \"currencies\")]\n        public IList<string> Currencies { get; set; }\n\n        /// <summary>\n        /// Gets or sets all store trusted groups (group of stores that shared\n        /// the user logins)\n        /// </summary>\n        [JsonProperty(PropertyName = \"trustedGroups\")]\n        public IList<string> TrustedGroups { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoObjectType\")]\n        public string SeoObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"seoInfos\")]\n        public IList<SeoInfo> SeoInfos { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"dynamicProperties\")]\n        public IList<DynamicObjectProperty> DynamicProperties { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"settings\")]\n        public IList<ObjectSettingEntry> Settings { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"typeName\")]\n        public string TypeName { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"scopes\")]\n        public IList<string> Scopes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdDate\")]\n        public System.DateTime? CreatedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedDate\")]\n        public System.DateTime? ModifiedDate { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"createdBy\")]\n        public string CreatedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"modifiedBy\")]\n        public string ModifiedBy { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"id\")]\n        public string Id { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SortInfo\n    {\n        /// <summary>\n        /// Initializes a new instance of the SortInfo class.\n        /// </summary>\n        public SortInfo()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SortInfo class.\n        /// </summary>\n        /// <param name=\"sortDirection\">Possible values include: 'Ascending',\n        /// 'Descending'</param>\n        public SortInfo(string sortColumn = default(string), string sortDirection = default(string))\n        {\n            SortColumn = sortColumn;\n            SortDirection = sortDirection;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortColumn\")]\n        public string SortColumn { get; set; }\n\n        /// <summary>\n        /// Gets or sets possible values include: 'Ascending', 'Descending'\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortDirection\")]\n        public string SortDirection { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class StoreSearchCriteria\n    {\n        /// <summary>\n        /// Initializes a new instance of the StoreSearchCriteria class.\n        /// </summary>\n        public StoreSearchCriteria()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the StoreSearchCriteria class.\n        /// </summary>\n        public StoreSearchCriteria(IList<string> storeIds = default(IList<string>), IList<string> storeStates = default(IList<string>), IList<string> fulfillmentCenterIds = default(IList<string>), string responseGroup = default(string), string objectType = default(string), IList<string> objectTypes = default(IList<string>), IList<string> objectIds = default(IList<string>), string keyword = default(string), string searchPhrase = default(string), string languageCode = default(string), string sort = default(string), IList<SortInfo> sortInfos = default(IList<SortInfo>), int? skip = default(int?), int? take = default(int?))\n        {\n            StoreIds = storeIds;\n            StoreStates = storeStates;\n            FulfillmentCenterIds = fulfillmentCenterIds;\n            ResponseGroup = responseGroup;\n            ObjectType = objectType;\n            ObjectTypes = objectTypes;\n            ObjectIds = objectIds;\n            Keyword = keyword;\n            SearchPhrase = searchPhrase;\n            LanguageCode = languageCode;\n            Sort = sort;\n            SortInfos = sortInfos;\n            Skip = skip;\n            Take = take;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeIds\")]\n        public IList<string> StoreIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeStates\")]\n        public IList<string> StoreStates { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"fulfillmentCenterIds\")]\n        public IList<string> FulfillmentCenterIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"responseGroup\")]\n        public string ResponseGroup { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectType\")]\n        public string ObjectType { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectTypes\")]\n        public IList<string> ObjectTypes { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"objectIds\")]\n        public IList<string> ObjectIds { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"keyword\")]\n        public string Keyword { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"searchPhrase\")]\n        public string SearchPhrase { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"languageCode\")]\n        public string LanguageCode { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sort\")]\n        public string Sort { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"sortInfos\")]\n        public IList<SortInfo> SortInfos { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"skip\")]\n        public int? Skip { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"take\")]\n        public int? Take { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class StoreSearchResult\n    {\n        /// <summary>\n        /// Initializes a new instance of the StoreSearchResult class.\n        /// </summary>\n        public StoreSearchResult()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the StoreSearchResult class.\n        /// </summary>\n        public StoreSearchResult(IList<Store> stores = default(IList<Store>), int? totalCount = default(int?), IList<Store> results = default(IList<Store>))\n        {\n            Stores = stores;\n            TotalCount = totalCount;\n            Results = results;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"stores\")]\n        public IList<Store> Stores { get; private set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"totalCount\")]\n        public int? TotalCount { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"results\")]\n        public IList<Store> Results { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    public partial class SendDynamicNotificationRequest\n    {\n        /// <summary>\n        /// Initializes a new instance of the SendDynamicNotificationRequest\n        /// class.\n        /// </summary>\n        public SendDynamicNotificationRequest()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the SendDynamicNotificationRequest\n        /// class.\n        /// </summary>\n        public SendDynamicNotificationRequest(string storeId = default(string), string type = default(string), IDictionary<string, string> fields = default(IDictionary<string, string>), string language = default(string))\n        {\n            StoreId = storeId;\n            Type = type;\n            Fields = fields;\n            Language = language;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"storeId\")]\n        public string StoreId { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"type\")]\n        public string Type { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"fields\")]\n        public IDictionary<string, string> Fields { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"language\")]\n        public string Language { get; set; }\n\n    }\n}\n// <auto-generated>\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is\n// regenerated.\n// </auto-generated>\n\nnamespace VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.Models\n{\n    using Microsoft.Rest;\n    using Microsoft.Rest.Serialization;\n    using Newtonsoft.Json;\n    using System.Collections;\n    using System.Collections.Generic;\n    using System.Linq;\n    using System.Net;\n    using System.Net.Http;\n    using System.Threading;\n    using System.Threading.Tasks;\n\n    /// <summary>\n    /// Represent result for checking of possibility login on behalf request\n    /// </summary>\n    public partial class LoginOnBehalfInfo\n    {\n        /// <summary>\n        /// Initializes a new instance of the LoginOnBehalfInfo class.\n        /// </summary>\n        public LoginOnBehalfInfo()\n        {\n            CustomInit();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the LoginOnBehalfInfo class.\n        /// </summary>\n        public LoginOnBehalfInfo(string userName = default(string), bool? canLoginOnBehalf = default(bool?))\n        {\n            UserName = userName;\n            CanLoginOnBehalf = canLoginOnBehalf;\n            CustomInit();\n        }\n\n        /// <summary>\n        /// An initialization method that performs custom operations like setting defaults\n        /// </summary>\n        partial void CustomInit();\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"userName\")]\n        public string UserName { get; set; }\n\n        /// <summary>\n        /// </summary>\n        [JsonProperty(PropertyName = \"canLoginOnBehalf\")]\n        public bool? CanLoginOnBehalf { get; set; }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/AutoRestClients/array-in-query-fix.yml",
    "content": "directive:\n- from: swagger-document\n  where: $.paths.*.get.parameters[?(@.schema.type === \"array\")]\n  transform: |    \n    if ($.in === \"query\") {\n        $.style = \"form\";\n        $.explode = true;\n    }\n  reason: polyfill"
  },
  {
    "path": "VirtoCommerce.Storefront/Caching/Redis/RedisCachingMessage.cs",
    "content": "using System;\nusing System.Linq;\n\nnamespace VirtoCommerce.Storefront.Caching.Redis\n{\n    internal class RedisCachingMessage\n    {\n        public RedisCachingMessage()\n        {\n            Id = $\"{Guid.NewGuid():N}\";\n            CreationDate = DateTime.UtcNow;\n        }\n\n        public DateTime? CreationDate { get; set; }\n\n        public string InstanceId { get; set; }\n        public string Id { get; set; }\n\n        public object[] CacheKeys { get; set; }\n\n        public bool IsPrefix { get; set; }\n\n        public bool IsToken { get; set; }\n\n        public override string ToString()\n        {\n            return $\"{InstanceId}:{(IsToken ? \"token\" : \"key\")}:{string.Join(\", \", CacheKeys?.Select(x => x) ?? Array.Empty<object>())}\";\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Caching/Redis/RedisCachingOptions.cs",
    "content": "using System;\nusing StackExchange.Redis;\n\nnamespace VirtoCommerce.Storefront.Caching.Redis\n{\n    public class RedisCachingOptions\n    {\n        /// <summary>\n        /// Gets or sets configuration options exposed by <c>StackExchange.Redis</c>.\n        /// </summary>\n        public ConfigurationOptions Configuration { get; set; } = new ConfigurationOptions\n        {\n            // Enable reconnecting by default\n            AbortOnConnectFail = false\n        };\n\n        public string ChannelName { get; set; }\n\n        [Obsolete(\"Use Redis connection string parameters for retry policy configration\")]\n        public int BusRetryCount { get; set; } = 3;\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Caching/Redis/RedisStorefrontMemoryCache.cs",
    "content": "using System;\nusing System.Linq;\nusing Microsoft.Extensions.Caching.Memory;\nusing Microsoft.Extensions.Logging;\nusing Microsoft.Extensions.Options;\nusing Newtonsoft.Json;\nusing StackExchange.Redis;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\n\nnamespace VirtoCommerce.Storefront.Caching.Redis\n{\n    internal class RedisStorefrontMemoryCache : StorefrontMemoryCache\n    {\n        private static string _instanceId { get; } = $\"{Environment.MachineName}_{Guid.NewGuid():N}\";\n\n        private readonly ISubscriber _bus;\n        private readonly RedisCachingOptions _redisCachingOptions;\n        private readonly StorefrontOptions _storefrontOptions;\n        private readonly ConnectionMultiplexer _connection;\n        private readonly ILogger<RedisStorefrontMemoryCache> _log;\n\n        private bool _isSubscribed;\n        private bool _disposed;\n        private readonly object _lock = new object();\n\n        public RedisStorefrontMemoryCache(IMemoryCache memoryCache\n            , IOptions<StorefrontOptions> cachingOptions\n            , IOptions<RedisCachingOptions> redisCachingOptions\n            , IWorkContextAccessor workContextAccessor\n            , ILoggerFactory loggerFactory\n            ) : base(memoryCache, cachingOptions, loggerFactory, workContextAccessor)\n        {\n            _connection = ConnectionMultiplexer.Connect(redisCachingOptions.Value.Configuration);\n            _log = loggerFactory?.CreateLogger<RedisStorefrontMemoryCache>();\n            _bus = _connection.GetSubscriber();\n\n            _redisCachingOptions = redisCachingOptions.Value;\n            _storefrontOptions = cachingOptions.Value;\n\n            CacheCancellableTokensRegistry.OnTokenCancelled = CacheCancellableTokensRegistry_OnTokenCancelled;\n        }\n\n        private void CacheCancellableTokensRegistry_OnTokenCancelled(TokenCancelledEventArgs e)\n        {\n            var message = new RedisCachingMessage { InstanceId = _instanceId, IsToken = true, CacheKeys = new[] { e.TokenKey } };\n            Publish(message);\n            _log.LogTrace($\"Published token cancellation message {message}\");\n        }\n\n        protected virtual void OnConnectionFailed(object sender, ConnectionFailedEventArgs e)\n        {\n            _log.LogError($\"Redis disconnected from instance {_instanceId}. Endpoint is {e.EndPoint}, failure type is {e.FailureType}\");\n\n            // If we have no connection to Redis, we can't invalidate cache on another platform instances,\n            // so the better idea is to disable cache at all for data consistence\n            CacheEnabled = false;\n            // We should fully clear cache because we don't know\n            // what's changed until platform found Redis is unavailable\n            GlobalCacheRegion.ExpireRegion();\n        }\n\n        protected virtual void OnConnectionRestored(object sender, ConnectionFailedEventArgs e)\n        {\n            _log.LogTrace($\"Redis backplane connection restored for instance {_instanceId}\");\n\n            // Return cache to the same state as it was initially.\n            // Don't set directly true because it may be disabled in app settings\n            CacheEnabled = _storefrontOptions.CacheEnabled;\n            // We should fully clear cache because we don't know\n            // what's changed in another instances since Redis became unavailable\n            GlobalCacheRegion.ExpireRegion();\n        }\n\n\n        protected virtual void OnMessage(RedisChannel channel, RedisValue redisValue)\n        {\n            var message = JsonConvert.DeserializeObject<RedisCachingMessage>(redisValue);\n\n            if (!string.IsNullOrEmpty(message.InstanceId) && !message.InstanceId.EqualsInvariant(_instanceId))\n            {\n                _log.LogTrace($\"Received message {message}\");\n\n                foreach (var key in message.CacheKeys?.OfType<string>() ?? Array.Empty<string>())\n                {\n                    if (message.IsToken)\n                    {\n                        _log.LogTrace($\"Trying to cancel token with key: {key}\");\n                        CacheCancellableTokensRegistry.TryCancelToken(key, raiseEvent: false);\n                    }\n                    else\n                    {\n                        _log.LogTrace($\"Trying to remove cache entry with key: {key} from in-memory cache\");\n                        base.Remove(key);\n                    }\n                }\n            }\n        }\n\n        public override bool TryGetValue(object key, out object value)\n        {\n            //We can't do subscription in the ctor due to the fact that it can be called multiple times despite the fact that it registered as a singleton.\n            //So we have delayed the connection and subscription to the Redis server until the first cache call.\n            EnsureRedisServerConnection();\n            return base.TryGetValue(key, out value);\n        }\n\n        protected override void EvictionCallback(object key, object value, EvictionReason reason, object state)\n        {\n            var message = new RedisCachingMessage { InstanceId = _instanceId, CacheKeys = new[] { key } };\n            Publish(message);\n            _log.LogTrace($\"Published message {message} to the Redis backplane\");\n\n            base.EvictionCallback(key, value, reason, state);\n        }\n\n        protected virtual RedisChannel GetRedisChannel()\n        {\n            return RedisChannel.Literal(_redisCachingOptions.ChannelName);\n        }\n\n        private void Publish(RedisCachingMessage message)\n        {\n            EnsureRedisServerConnection();\n            _bus.Publish(GetRedisChannel(), JsonConvert.SerializeObject(message), CommandFlags.FireAndForget);\n        }\n\n        private void EnsureRedisServerConnection()\n        {\n            if (!_isSubscribed)\n            {\n                lock (_lock)\n                {\n                    if (!_isSubscribed)\n                    {\n                        _connection.ConnectionFailed += OnConnectionFailed;\n                        _connection.ConnectionRestored += OnConnectionRestored;\n\n                        _bus.Subscribe(GetRedisChannel(), OnMessage, CommandFlags.FireAndForget);\n\n                        _log.LogTrace($\"Successfully subscribed to Redis backplane channel {_redisCachingOptions.ChannelName} with instance id:{_instanceId}\");\n                        _isSubscribed = true;\n                    }\n                }\n            }\n\n        }\n\n        protected override void Dispose(bool disposing)\n        {\n            if (!_disposed)\n            {\n                if (disposing)\n                {\n                    _bus.Unsubscribe(GetRedisChannel(), null, CommandFlags.FireAndForget);\n                    _connection.ConnectionFailed -= OnConnectionFailed;\n                    _connection.ConnectionRestored -= OnConnectionRestored;\n                }\n                _disposed = true;\n            }\n\n            base.Dispose(disposing);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Caching/ServiceCollectionExtensions.cs",
    "content": "using System;\nusing Microsoft.Extensions.DependencyInjection;\nusing StackExchange.Redis;\nusing VirtoCommerce.Storefront.Caching.Redis;\nusing VirtoCommerce.Storefront.Model.Caching;\n\nnamespace VirtoCommerce.Storefront.Caching\n{\n    public static class ServiceCollectionExtensions\n    {\n        public static IServiceCollection AddStorefrontCache(this IServiceCollection services, string redisConnectionString, Action<RedisCachingOptions> configure)\n        {\n            if (!string.IsNullOrEmpty(redisConnectionString))\n            {\n                services.Configure<RedisCachingOptions>(o =>\n                {\n                    o.Configuration = ConfigurationOptions.Parse(redisConnectionString);\n                    configure(o);\n                });\n                services.AddSingleton<IStorefrontMemoryCache, RedisStorefrontMemoryCache>();\n            }\n            else\n            {\n                services.AddSingleton<IStorefrontMemoryCache, StorefrontMemoryCache>();\n            }\n\n            return services;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Caching/StorefrontMemoryCache.cs",
    "content": "using System;\nusing Microsoft.Extensions.Caching.Memory;\nusing Microsoft.Extensions.Logging;\nusing Microsoft.Extensions.Options;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\n\nnamespace VirtoCommerce.Storefront.Caching\n{\n    public class StorefrontMemoryCache : IStorefrontMemoryCache\n    {\n        private readonly StorefrontOptions _storefrontOptions;\n        private readonly IMemoryCache _memoryCache;\n        private bool _disposed;\n        private readonly ILogger _log;\n        private readonly IWorkContextAccessor _workContextAccessor;\n\n        public StorefrontMemoryCache(IMemoryCache memoryCache, IOptions<StorefrontOptions> storefrontOptions, ILoggerFactory loggerFactory, IWorkContextAccessor workContextAccessor)\n        {\n            _workContextAccessor = workContextAccessor;\n            _memoryCache = memoryCache;\n            _storefrontOptions = storefrontOptions.Value;\n            CacheEnabled = _storefrontOptions.CacheEnabled;\n            _log = loggerFactory?.CreateLogger<StorefrontMemoryCache>();\n        }\n\n        public MemoryCacheEntryOptions GetDefaultCacheEntryOptions()\n        {\n            var result = new MemoryCacheEntryOptions();\n\n            if (!CacheEnabled)\n            {\n                result.AbsoluteExpirationRelativeToNow = TimeSpan.FromTicks(1);\n            }\n            else\n            {\n                if (AbsoluteExpiration != null)\n                {\n                    result.AbsoluteExpirationRelativeToNow = AbsoluteExpiration;\n                }\n                else if (SlidingExpiration != null)\n                {\n                    result.SlidingExpiration = SlidingExpiration;\n                }\n\n                result.AddExpirationToken(GlobalCacheRegion.CreateChangeToken());\n            }\n            return result;\n        }\n\n        public virtual ICacheEntry CreateEntry(object key)\n        {\n            var result = _memoryCache.CreateEntry(key);\n            if (result != null)\n            {\n                result.RegisterPostEvictionCallback(callback: EvictionCallback);\n                var options = GetDefaultCacheEntryOptions();\n                result.SetOptions(options);\n            }\n            return result;\n        }\n\n        public virtual void Remove(object key)\n        {\n            _memoryCache.Remove(key);\n        }\n\n        public virtual bool TryGetValue(object key, out object value)\n        {\n            var result = _memoryCache.TryGetValue(key, out value);\n            //Do not use value from cache for preview mode\n            if (_workContextAccessor.WorkContext != null && _workContextAccessor.WorkContext.IsPreviewMode)\n            {\n                result = false;\n            }\n            return result;\n        }\n\n        protected TimeSpan? AbsoluteExpiration => _storefrontOptions.CacheAbsoluteExpiration;\n        protected TimeSpan? SlidingExpiration => _storefrontOptions.CacheSlidingExpiration;\n\n        protected bool CacheEnabled { get; set; }\n\n\n        ~StorefrontMemoryCache()\n        {\n            Dispose(false);\n        }\n\n        public void Dispose()\n        {\n            Dispose(true);\n            // This object will be cleaned up by the Dispose method.\n            // Therefore, you should call GC.SupressFinalize to\n            // take this object off the finalization queue\n            // and prevent finalization code for this object\n            // from executing a second time.\n            GC.SuppressFinalize(this);\n        }\n\n        protected virtual void Dispose(bool disposing)\n        {\n            if (!_disposed)\n            {\n                if (disposing)\n                {\n                    _memoryCache.Dispose();\n                }\n                _disposed = true;\n            }\n        }\n\n        protected virtual void EvictionCallback(object key, object value, EvictionReason reason, object state)\n        {\n            _log.LogInformation($\"EvictionCallback: Cache with key {key} has expired.\");\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Connected Services/Application Insights/ConnectedService.json",
    "content": "{\n  \"ProviderId\": \"Microsoft.ApplicationInsights.ConnectedService.ConnectedServiceProvider\",\n  \"Version\": \"8.8.712.1\",\n  \"GettingStartedDocument\": {\n    \"Uri\": \"https://go.microsoft.com/fwlink/?LinkID=798432\"\n  }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront/Controllers/AccountController.cs",
    "content": "using System;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authorization;\nusing Microsoft.AspNetCore.Identity;\nusing Microsoft.AspNetCore.Mvc;\nusing VirtoCommerce.Storefront.Domain.Security;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Security;\n\nnamespace VirtoCommerce.Storefront.Controllers\n{\n    [StorefrontRoute(\"account\")]\n    public class AccountController : StorefrontControllerBase\n    {\n        private readonly SignInManager<User> _signInManager;\n        private readonly IAuthorizationService _authorizationService;\n\n        public AccountController(\n            IWorkContextAccessor workContextAccessor,\n            IStorefrontUrlBuilder urlBuilder,\n            SignInManager<User> signInManager,\n            IAuthorizationService authorizationService)\n            : base(workContextAccessor, urlBuilder)\n        {\n            _signInManager = signInManager;\n            _authorizationService = authorizationService;\n        }\n\n\n        // GET: /account/impersonate/{userId}\n        /// <summary>\n        /// Handles the impersonation functionality. It allows an authenticated user to impersonate another user by specifying the userId. \n        /// </summary>\n        /// <param name=\"userId\"></param>\n        /// <returns></returns>\n        [HttpGet(\"impersonate/{userId}\")]\n        public async Task<IActionResult> ImpersonateUser(string userId)\n        {\n            // If the user is not authenticated, redirect to the sign-in page\n            if (User.Identity.Name == SecurityConstants.AnonymousUsername)\n            {\n                return StoreFrontRedirect($\"~/sign-in?returnUrl={System.Uri.EscapeDataString(Request.Path)}\");\n            }\n\n            // If the user is not impersonating any user, check permission\n            if (string.IsNullOrEmpty(WorkContext.CurrentUser.OperatorUserId))\n            {\n                var authorizationResult = await _authorizationService.AuthorizeAsync(User, null, CanImpersonateAuthorizationRequirement.PolicyName);\n\n                if (!authorizationResult.Succeeded)\n                {\n                    return Forbid();\n                }\n            }\n\n            // find the user to impersonate\n            var impersonateUser = await _signInManager.UserManager.FindByIdAsync(userId);\n\n            // if the user is found, update the impersonated user and sign in\n            if (impersonateUser == null)\n            {\n                return NotFound();\n            }\n\n            UpdateImpersonatedUser(impersonateUser);\n            await SignOutAndSignInAsync(impersonateUser);\n\n            // redirect to the home page\n            return StoreFrontRedirect(\"~/\");\n        }\n\n        // GET: /account/impersonate/reset\n        /// <summary>\n        /// Resets the impersonation state and restore the original user's identity after being impersonated.\n        /// </summary>\n        /// <returns></returns>\n        [HttpGet(\"impersonate/reset\")]\n        public async Task<IActionResult> ResetImpersonatation()\n        {\n            var operatorUserId = WorkContext.CurrentUser.OperatorUserId;\n\n            if (string.IsNullOrEmpty(operatorUserId))\n            {\n                return StoreFrontRedirect(\"~/\");\n            }\n\n            var operatorUser = await _signInManager.UserManager.FindByIdAsync(operatorUserId);\n\n            if (operatorUser == null)\n            {\n                return NotFound();\n            }\n\n            await SignOutAndSignInAsync(operatorUser);\n\n            return StoreFrontRedirect(\"~/\");\n        }\n\n        /// <summary>\n        /// Update operator to the impersonated user or keep current the operator if already impersonating\n        /// </summary>\n        /// <param name=\"impersonateUser\"></param>\n        private void UpdateImpersonatedUser(User impersonateUser)\n        {\n            impersonateUser.OperatorUserId = WorkContext.CurrentUser.OperatorUserId ?? WorkContext.CurrentUser.Id;\n            impersonateUser.OperatorUserName = WorkContext.CurrentUser.OperatorUserName ?? WorkContext.CurrentUser.UserName;\n            impersonateUser.OperatorFullName = WorkContext.CurrentUser.OperatorFullName ?? WorkContext.CurrentUser.Name;\n        }\n\n        /// <summary>\n        /// Sign out the current user and sign in the impersonated user\n        /// </summary>\n        /// <param name=\"user\"></param>\n        /// <returns></returns>\n        private async Task SignOutAndSignInAsync(User user)\n        {\n            await _signInManager.SignOutAsync();\n            await _signInManager.SignInAsync(user, isPersistent: false);\n            await SetLastLoginDate(user);\n        }\n\n        private Task SetLastLoginDate(User user)\n        {\n            user.LastLoginDate = DateTime.UtcNow;\n            user.AccessFailedCount = 0;\n            return _signInManager.UserManager.UpdateAsync(user);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Controllers/Api/ApiAccountController.cs",
    "content": "using System;\nusing System.Linq;\nusing System.Net;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authorization;\nusing Microsoft.AspNetCore.Identity;\nusing Microsoft.AspNetCore.Mvc;\nusing Microsoft.Extensions.Options;\nusing VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi;\nusing VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models;\nusing VirtoCommerce.Storefront.Domain;\nusing VirtoCommerce.Storefront.Domain.Common;\nusing VirtoCommerce.Storefront.Domain.Security;\nusing VirtoCommerce.Storefront.Domain.Security.Notifications;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Events;\nusing VirtoCommerce.Storefront.Model.Common.Notifications;\nusing VirtoCommerce.Storefront.Model.Security;\nusing VirtoCommerce.Storefront.Model.Security.Events;\nusing VirtoCommerce.Storefront.Model.Security.Specifications;\n\nnamespace VirtoCommerce.Storefront.Controllers.Api\n{\n    [StorefrontApiRoute(\"account\")]\n    [ResponseCache(CacheProfileName = \"None\")]\n    public class ApiAccountController : StorefrontControllerBase\n    {\n        private readonly SignInManager<User> _signInManager;\n        private readonly IEventPublisher _publisher;\n        private readonly StorefrontOptions _options;\n        private readonly INotifications _platformNotificationApi;\n        private readonly IdentityOptions _identityOptions;\n\n        public ApiAccountController(IWorkContextAccessor workContextAccessor,\n            IStorefrontUrlBuilder urlBuilder,\n            SignInManager<User> signInManager,\n            IEventPublisher publisher,\n            INotifications platformNotificationApi,\n            IOptions<StorefrontOptions> options,\n            IOptions<IdentityOptions> identityOptions)\n            : base(workContextAccessor, urlBuilder)\n        {\n            _signInManager = signInManager;\n            _publisher = publisher;\n            _options = options.Value;\n            _platformNotificationApi = platformNotificationApi;\n            _identityOptions = identityOptions.Value;\n        }\n\n        // GET: storefrontapi/account\n        [Obsolete(\"Use me query from GraphQL\")]\n        [HttpGet]\n        [AllowAnonymous]\n        public ActionResult<User> GetCurrentUser()\n        {\n            return WorkContext.CurrentUser;\n        }\n\n        [HttpPost(\"login\")]\n        [AllowAnonymous]\n        public async Task<ActionResult<UserActionIdentityResult>> Login([FromBody] Login login, [FromQuery] string returnUrl)\n        {\n            TryValidateModel(login);\n\n            if (!ModelState.IsValid)\n            {\n                return UserActionIdentityResult.Failed(ModelState.Values.SelectMany(x => x.Errors)\n                      .Select(x => new IdentityError { Description = x.ErrorMessage })\n                      .ToArray());\n            }\n\n            login.Email = login.Email?.Trim();\n            login.UserName = login.UserName?.Trim();\n\n            User user = null;\n\n            if (!string.IsNullOrEmpty(login.UserName))\n            {\n                user = await _signInManager.UserManager.FindByNameAsync(login.UserName);\n            }\n            else if (!string.IsNullOrEmpty(login.Email))\n            {\n                user = await _signInManager.UserManager.FindByEmailAsync(login.Email);\n            }\n            else\n            {\n                return UserActionIdentityResult.Failed(SecurityErrorDescriber.UsernameOrEmailIsRequired());\n            }\n\n            if (user == null)\n            {\n                return UserActionIdentityResult.Failed(SecurityErrorDescriber.LoginFailed());\n            }\n\n            var loginResult = await _signInManager.PasswordSignInAsync(user.UserName, login.Password, login.RememberMe, lockoutOnFailure: true);\n\n            if (!loginResult.Succeeded)\n            {\n                if (loginResult.IsLockedOut)\n                {\n                    if (new IsUserLockedByRequiredEmailVerificationSpecification(user).IsSatisfiedBy(WorkContext.CurrentStore))\n                    {\n                        return UserActionIdentityResult.Failed(SecurityErrorDescriber.EmailVerificationIsRequired());\n                    }\n                    if (new IsUserTemporaryLockedOutSpecification().IsSatisfiedBy(user))\n                    {\n                        return UserActionIdentityResult.Failed(SecurityErrorDescriber.UserIsTemporaryLockedOut());\n                    }\n\n                    return UserActionIdentityResult.Failed(SecurityErrorDescriber.UserIsLockedOut());\n                }\n\n                return UserActionIdentityResult.Failed(SecurityErrorDescriber.LoginFailed());\n            }\n            else\n            {\n                if (user.Contact == null)\n                {\n                    ResetIdentityCookies();\n\n                    return UserActionIdentityResult.Failed(SecurityErrorDescriber.UserNotFound());\n                }\n\n                if (new IsUserPasswordExpiredSpecification().IsSatisfiedBy(user))\n                {\n                    return UserActionIdentityResult.Failed(SecurityErrorDescriber.PasswordExpired(user.Id));\n                }\n\n                if (!new CanUserLoginToStoreSpecification(user).IsSatisfiedBy(WorkContext.CurrentStore))\n                {\n                    ResetIdentityCookies();\n\n                    return UserActionIdentityResult.Failed(SecurityErrorDescriber.UserCannotLoginInStore());\n                }\n\n            }\n\n            await SetLastLoginDate(user);\n            await _publisher.Publish(new UserLoginEvent(WorkContext, user));\n\n            var result = UserActionIdentityResult.Success;\n\n            if (!string.IsNullOrEmpty(returnUrl))\n            {\n                var newUrl = Url.IsLocalUrl(returnUrl) ? returnUrl : \"~/\";\n                result.ReturnUrl = UrlBuilder.ToAppRelative(newUrl, WorkContext.CurrentStore, WorkContext.CurrentLanguage);\n            }\n\n            return result;\n        }\n\n        private void ResetIdentityCookies()\n        {\n            Response.Cookies.Delete(\".AspNetCore.Identity.Application\");\n        }\n\n        // POST: storefrontapi/account/user\n        [Obsolete(\"Use requestRegistration mutations from GraphQL\")]\n        [HttpPost(\"user\")]\n        public async Task<ActionResult<UserActionIdentityResult>> RegisterUser([FromBody] UserRegistration registration)\n        {\n            var result = UserActionIdentityResult.Success;\n\n            TryValidateModel(registration);\n\n            if (!ModelState.IsValid)\n            {\n                return UserActionIdentityResult.Failed(ModelState.Values.SelectMany(x => x.Errors)\n                       .Select(x => new IdentityError { Description = x.ErrorMessage })\n                       .ToArray());\n            }\n            // Register user\n            var user = registration.ToUser();\n            user.Contact = registration.ToContact();\n            user.StoreId = WorkContext.CurrentStore.Id;\n\n            var identityResult = await _signInManager.UserManager.CreateAsync(user, registration.Password);\n            if (identityResult.Succeeded)\n            {\n                user = await _signInManager.UserManager.FindByNameAsync(user.UserName);\n                await _publisher.Publish(new UserRegisteredEvent(WorkContext, user, registration));\n\n                if (!_identityOptions.SignIn.RequireConfirmedEmail)\n                {\n                    await _signInManager.SignInAsync(user, isPersistent: true);\n                    await SetLastLoginDate(user);\n                    await _publisher.Publish(new UserLoginEvent(WorkContext, user));\n                }\n\n                // Send new user registration notification\n                var registrationEmailNotification = new RegistrationEmailNotification(WorkContext.CurrentStore.Id, WorkContext.CurrentLanguage)\n                {\n                    FirstName = registration.FirstName,\n                    LastName = registration.LastName,\n                    Login = registration.UserName,\n                    Sender = WorkContext.CurrentStore.Email,\n                    Recipient = GetUserEmail(user)\n                };\n                await SendNotificationAsync(registrationEmailNotification);\n\n                if (_options.SendAccountConfirmation)\n                {\n                    var token = await _signInManager.UserManager.GenerateEmailConfirmationTokenAsync(user);\n                    var callbackUrl = Url.Action(\"ConfirmEmail\", \"Account\", new { UserId = user.Id, Token = token }, protocol: Request.Scheme, host: WorkContext.CurrentStore.Host);\n\n                    var emailConfirmationNotification = new EmailConfirmationNotification(WorkContext.CurrentStore.Id, WorkContext.CurrentLanguage)\n                    {\n                        Url = callbackUrl,\n                        Sender = WorkContext.CurrentStore.Email,\n                        Recipient = GetUserEmail(user)\n                    };\n                    var sendNotifcationResult = await SendNotificationAsync(emailConfirmationNotification);\n                    if (sendNotifcationResult.IsSuccess == false)\n                    {\n                        var error = SecurityErrorDescriber.ErrorSendNotification(sendNotifcationResult.ErrorMessage);\n                        result = UserActionIdentityResult.Failed(new IdentityError { Code = error.Code, Description = error.Description });\n                    }\n                }\n            }\n            else\n            {\n                result = UserActionIdentityResult.Failed(identityResult.Errors.ToArray());\n\n            }\n\n            return result;\n        }\n\n\n        // POST: storefrontapi/account/password\n        [Obsolete(\"Use changePassword mutation from GraphQL\")]\n        [HttpPost(\"password\")]\n        public async Task<ActionResult<PasswordChangeResult>> ChangePassword([FromBody] ChangePassword formModel)\n        {\n            var result = await _signInManager.UserManager.ChangePasswordAsync(WorkContext.CurrentUser, formModel.OldPassword, formModel.NewPassword);\n            return new PasswordChangeResult { Succeeded = result.Succeeded, Errors = result.Errors.Select(x => new FormError { Code = x.Code.PascalToKebabCase(), Description = x.Description }).ToList() };\n        }\n\n\n        // DELETE: storefrontapi/account/phonenumber\n        [HttpDelete(\"phonenumber\")]\n        public async Task<ActionResult<RemovePhoneNumberResult>> RemovePhoneNumber()\n        {\n            var twoFactorAuthEnabled = await _signInManager.UserManager.GetTwoFactorEnabledAsync(WorkContext.CurrentUser);\n            if (twoFactorAuthEnabled)\n            {\n                return Forbid();\n            }\n\n            var result = await _signInManager.UserManager.SetPhoneNumberAsync(WorkContext.CurrentUser, null);\n            await _signInManager.SignInAsync(WorkContext.CurrentUser, isPersistent: false);\n\n            return new RemovePhoneNumberResult { Succeeded = result.Succeeded, Errors = result.Errors.Select(x => x.Description) };\n        }\n\n        // POST: storefrontapi/account/twofactorauthentification\n        [HttpPost(\"twofactorauthentification\")]\n        public async Task<ActionResult<ChangeTwoFactorAuthenticationResult>> ChangeTwoFactorAuthentication([FromBody] ChangeTwoFactorAuthenticationModel model)\n        {\n            if (model.Enabled)\n            {\n                var phoneConfirmed = await _signInManager.UserManager.IsPhoneNumberConfirmedAsync(WorkContext.CurrentUser);\n                if (!phoneConfirmed)\n                {\n                    var url = \"/account/phonenumber\";\n\n                    return new ChangeTwoFactorAuthenticationResult { Succeeded = false, VerificationUrl = url };\n                }\n            }\n\n            var result = await _signInManager.UserManager.SetTwoFactorEnabledAsync(WorkContext.CurrentUser, model.Enabled);\n            await _signInManager.SignInAsync(WorkContext.CurrentUser, isPersistent: false);\n\n            return new ChangeTwoFactorAuthenticationResult { Succeeded = result.Succeeded, Errors = result.Errors.Select(x => x.Description) };\n        }\n\n        // POST: storefrontapi/account/phonenumber\n        [HttpPost(\"phonenumber\")]\n        public async Task<ActionResult<UpdatePhoneNumberResult>> UpdatePhoneNumber([FromBody] UpdatePhoneNumberModel model)\n        {\n            var twoFactorAuthEnabled = await _signInManager.UserManager.GetTwoFactorEnabledAsync(WorkContext.CurrentUser);\n\n            if (twoFactorAuthEnabled)\n            {\n                return Forbid();\n            }\n\n            TryValidateModel(model);\n\n            if (!ModelState.IsValid)\n            {\n                return new UpdatePhoneNumberResult { Succeeded = false, Error = \"Phone number is not valid\" };\n            }\n\n            var result = await _signInManager.UserManager.SetPhoneNumberAsync(WorkContext.CurrentUser, model.PhoneNumber);\n            await _signInManager.SignInAsync(WorkContext.CurrentUser, isPersistent: false);\n\n            return new UpdatePhoneNumberResult { Succeeded = result.Succeeded };\n\n        }\n\n        // POST: storefrontapi/account/logout\n        [HttpGet(\"logout\")]\n        [AllowAnonymous]\n        public async Task<ActionResult> Logout()\n        {\n            await _signInManager.SignOutAsync();\n\n            return NoContent();\n        }\n\n        // POST: storefrontapi/account/forgotpassword\n        [Obsolete(\"Use requestPasswordReset mutation from GraphQL\")]\n        [HttpPost(\"forgotPassword\")]\n        [AllowAnonymous]\n        public async Task<ActionResult<UserActionIdentityResult>> ForgotPassword([FromBody] ForgotPasswordModel forgotPassword)\n        {\n            var result = UserActionIdentityResult.Success;\n\n            TryValidateModel(forgotPassword);\n\n            if (!ModelState.IsValid)\n            {\n                return UserActionIdentityResult.Failed(ModelState.Values.SelectMany(x => x.Errors)\n                    .Select(x => new IdentityError { Description = x.ErrorMessage })\n                    .ToArray());\n            }\n\n            var user = await _signInManager.UserManager.FindByEmailAsync(forgotPassword.Email);\n\n            if (user == null)\n            {\n                user = await _signInManager.UserManager.FindByNameAsync(forgotPassword.Email);\n            }\n\n            if (user == null)\n            {\n                // Don't reveal that the user does not exist\n                return result;\n            }\n\n            NotificationBase resetPasswordNotification;\n\n            if (_options.ResetPasswordNotificationGateway.EqualsInvariant(\"Phone\"))\n            {\n                var phoneNumber = await _signInManager.UserManager.GetPhoneNumberAsync(user);\n\n                if (string.IsNullOrEmpty(phoneNumber))\n                {\n                    return UserActionIdentityResult.Failed(SecurityErrorDescriber.PhoneNumberNotFound());\n                }\n\n                var token = await _signInManager.UserManager.GenerateUserTokenAsync(user, TokenOptions.DefaultPhoneProvider, \"ResetPassword\");\n\n                resetPasswordNotification = new ResetPasswordSmsNotification(WorkContext.CurrentStore.Id, WorkContext.CurrentLanguage)\n                {\n                    Token = token,\n                    Recipient = phoneNumber,\n                };\n            }\n            else // \"Email\"\n            {\n                var token = await _signInManager.UserManager.GeneratePasswordResetTokenAsync(user);\n                token = WebUtility.UrlEncode(token);\n                var resetPasswordUri = new UriBuilder(forgotPassword.ResetPasswordUrl) { Query = $\"userId={user.Id}&token={token}\" };\n\n                resetPasswordNotification = new ResetPasswordEmailNotification(WorkContext.CurrentStore.Id, WorkContext.CurrentLanguage)\n                {\n                    Url = resetPasswordUri.ToString(),\n                    Sender = WorkContext.CurrentStore.Email,\n                    Recipient = GetUserEmail(user)\n                };\n            }\n\n            var sendingResult = await SendNotificationAsync(resetPasswordNotification);\n\n            if (sendingResult.IsSuccess == false)\n            {\n                return UserActionIdentityResult.Failed(SecurityErrorDescriber.ErrorSendNotification(sendingResult.ErrorMessage));\n            }\n\n            return result;\n        }\n\n        // POST: storefrontapi/account/validateToken\n        [Obsolete(\"This API no longer used. See XAPI documentation\")]\n        [HttpPost(\"validateToken\")]\n        [AllowAnonymous]\n        public async Task<ActionResult<UserActionIdentityResult>> ValidateResetPasswordToken([FromBody] ValidateTokenModel model)\n        {\n            var result = UserActionIdentityResult.Success;\n\n            TryValidateModel(model);\n\n            if (!ModelState.IsValid)\n            {\n                return UserActionIdentityResult.Failed(ModelState.Values.SelectMany(x => x.Errors)\n                    .Select(x => new IdentityError { Description = x.ErrorMessage })\n                    .ToArray());\n            }\n\n            var user = await _signInManager.UserManager.FindByIdAsync(model.UserId);\n\n            if (user == null)\n            {\n                // Don't reveal that the user does not exist\n                return UserActionIdentityResult.Failed(SecurityErrorDescriber.InvalidToken());\n            }\n\n            var isValidToken = await _signInManager.UserManager.VerifyUserTokenAsync(user, _signInManager.UserManager.Options.Tokens.PasswordResetTokenProvider, UserManager<User>.ResetPasswordTokenPurpose, model.Token);\n\n            if (!isValidToken)\n            {\n                return UserActionIdentityResult.Failed(SecurityErrorDescriber.InvalidToken());\n            }\n\n            return result;\n        }\n\n        // POST: storefrontapi/account/resetPassword\n        [Obsolete(\"Use resetPasswordByToken mutation from GraphQL\")]\n        [HttpPost(\"resetPassword\")]\n        [AllowAnonymous]\n        public async Task<ActionResult<UserActionIdentityResult>> ResetPassword([FromBody] ResetPasswordModel model)\n        {\n            var result = UserActionIdentityResult.Success;\n\n            TryValidateModel(model);\n\n            if (string.IsNullOrEmpty(model.UserId))\n            {\n                return UserActionIdentityResult.Failed(SecurityErrorDescriber.ResetPasswordInvalidData());\n            }\n\n            if (!ModelState.IsValid)\n            {\n                return UserActionIdentityResult.Failed(ModelState.Values.SelectMany(x => x.Errors)\n                    .Select(x => new IdentityError { Description = x.ErrorMessage })\n                    .ToArray());\n            }\n\n            var user = await _signInManager.UserManager.FindByIdAsync(model.UserId);\n\n            if (user == null)\n            {\n                // Don't reveal that the user does not exist\n                return result;\n            }\n\n            var resetPasswordResult = await _signInManager.UserManager.ResetPasswordAsync(user, model.Token, model.Password);\n\n\n            if (!resetPasswordResult.Succeeded)\n            {\n                result = UserActionIdentityResult.Failed(resetPasswordResult.Errors.ToArray());\n            }\n\n            return result;\n        }\n\n        // POST: storefrontapi/account/confirmemail\n        [Obsolete(\"Use confirmEmail mutation from GraphQL\")]\n        [HttpPost(\"confirmemail\")]\n        [AllowAnonymous]\n        public async Task<ActionResult<UserActionIdentityResult>> ConfirmEmail([FromBody] ConfirmEmailModel model)\n        {\n            TryValidateModel(model);\n\n            if (!ModelState.IsValid)\n            {\n                return UserActionIdentityResult.Failed(ModelState.Values.SelectMany(x => x.Errors)\n                    .Select(x => new IdentityError { Description = x.ErrorMessage })\n                    .ToArray());\n            }\n\n            var user = await _signInManager.UserManager.FindByIdAsync(model.UserId);\n\n            if (user == null)\n            {\n                // Don't reveal that the user does not exist\n                return UserActionIdentityResult.Failed(SecurityErrorDescriber.InvalidToken());\n            }\n\n            var confirmEmailResult = await _signInManager.UserManager.ConfirmEmailAsync(user, model.Token);\n\n            if (!confirmEmailResult.Succeeded)\n            {\n                return UserActionIdentityResult.Failed(confirmEmailResult.Errors.ToArray());\n            }\n\n            return UserActionIdentityResult.Success;\n        }\n\n        private static string GetUserEmail(User user)\n        {\n            string email = null;\n            if (user != null)\n            {\n                email = user.Email ?? user.UserName;\n                if (user.Contact != null)\n                {\n                    email = user.Contact?.Email ?? email;\n                }\n            }\n            return email;\n        }\n\n\n        private async Task<NotificationSendResult> SendNotificationAsync(NotificationBase notification)\n        {\n            NotificationSendResult result;\n\n            try\n            {\n                result = await _platformNotificationApi.SendNotificationByRequestAsync(notification.ToNotificationDto());\n            }\n            catch (Exception exception)\n            {\n                result = new NotificationSendResult\n                {\n                    IsSuccess = false,\n                    ErrorMessage = $\"Error occurred while sending notification: {exception.Message}\"\n                };\n            }\n\n            return result;\n        }\n\n        private Task SetLastLoginDate(User user)\n        {\n            user.LastLoginDate = DateTime.UtcNow;\n            user.AccessFailedCount = 0;\n            return _signInManager.UserManager.UpdateAsync(user);\n        }\n\n        // GET: storefrontapi/account/passwordrequirements\n        [HttpGet(\"passwordrequirements\")]\n        [AllowAnonymous]\n        public ActionResult<PasswordOptions> GetPasswordRequirements()\n        {\n            return _identityOptions.Password;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Controllers/Api/ApiBlogController.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Microsoft.AspNetCore.Mvc;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.StaticContent;\n\nnamespace VirtoCommerce.Storefront.Controllers.Api\n{\n    [StorefrontApiRoute(\"blog\")]\n    [ResponseCache(CacheProfileName = \"None\")]\n    public class ApiBlogController : StorefrontControllerBase\n    {\n        public ApiBlogController(IWorkContextAccessor workContextAccessor, IStorefrontUrlBuilder urlBuilder)\n            : base(workContextAccessor, urlBuilder)\n        {\n        }\n\n        // POST: storefrontapi/blog/{blogName}/search\n        [HttpPost(\"{blogName}/search\")]\n        [ValidateAntiForgeryToken]\n        public ActionResult<List<BlogArticle>> Search([FromRoute] string blogName, [FromBody] BlogSearchCriteria criteria)\n        {\n            var articles = new List<BlogArticle>();\n\n            var blog = WorkContext.Blogs.FirstOrDefault(b => b.Name.Equals(blogName, StringComparison.OrdinalIgnoreCase));\n            if (blog != null)\n            {\n                var query = blog.Articles.AsQueryable().Where(x => x.IsPublished);\n                if (!string.IsNullOrEmpty(criteria.Category))\n                {\n                    query = query.Where(a => !string.IsNullOrEmpty(a.Category) && a.Category.Handelize().EqualsInvariant(criteria.Category));\n                }\n                if (!string.IsNullOrEmpty(criteria.Tag))\n                {\n                    query = query.Where(a => a.Tags != null && a.Tags.Select(t => t.Handelize()).Contains(criteria.Tag, StringComparer.OrdinalIgnoreCase));\n                }\n                if (criteria.ExcludedArticleHandles != null && criteria.ExcludedArticleHandles.Any())\n                {\n                    query = query.Where(a => !criteria.ExcludedArticleHandles.Contains(a.Url));\n                }\n\n                articles = query.OrderByDescending(a => a.CreatedDate).Skip((criteria.PageNumber - 1) * criteria.PageSize).Take(criteria.PageSize).ToList();\n            }\n\n            return articles;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Controllers/Api/ApiCommonController.cs",
    "content": "using System;\nusing System.Linq;\nusing System.Reflection;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authorization;\nusing Microsoft.AspNetCore.Mvc;\nusing VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi;\nusing VirtoCommerce.Storefront.Domain;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Controllers.Api\n{\n    [StorefrontApiRoute(\"\")]\n    [ResponseCache(CacheProfileName = \"None\")]\n    public class ApiCommonController : StorefrontControllerBase\n    {\n        private readonly IStoreModule _storeApi;\n        private readonly ISeoInfoService _seoInfoService;\n        private readonly Country[] _countriesWithoutRegions;\n\n        public ApiCommonController(\n            IWorkContextAccessor workContextAccessor,\n            IStorefrontUrlBuilder urlBuilder,\n            IStoreModule storeApi,\n            ISeoInfoService seoInfoService) : base(workContextAccessor, urlBuilder)\n        {\n            _storeApi = storeApi;\n            _seoInfoService = seoInfoService;\n            _countriesWithoutRegions = WorkContext.AllCountries\n                 .Select(c => new Country { Name = c.Name, Code2 = c.Code2, Code3 = c.Code3, RegionType = c.RegionType })\n                 .ToArray();\n        }\n\n        // GET: storefrontapi/countries\n        [Obsolete(\"Use countries query from GraphQL\")]\n        [HttpGet(\"countries\")]\n        public ActionResult<Country[]> GetCountries()\n        {\n            return _countriesWithoutRegions;\n        }\n\n        // GET: storefrontapi/countries/{countryCode}/regions\n        [Obsolete(\"Use countries or regions query from GraphQL\")]\n        [HttpGet(\"countries/{countryCode}/regions\")]\n        public ActionResult<CountryRegion[]> GetCountryRegions(string countryCode)\n        {\n            var country = WorkContext.AllCountries.FirstOrDefault(c => c.Code2.Equals(countryCode, StringComparison.InvariantCultureIgnoreCase) || c.Code3.Equals(countryCode, StringComparison.InvariantCultureIgnoreCase));\n            if (country != null)\n            {\n                return country.Regions;\n            }\n            return Ok();\n        }\n\n        // POST: storefrontapi/feedback\n        [HttpPost(\"feedback\")]\n        [ValidateAntiForgeryToken]\n        public async Task<ActionResult> Feedback([FromBody] ContactForm model)\n        {\n            await _storeApi.SendDynamicNotificationAnStoreEmailAsync(model.ToServiceModel(WorkContext));\n\n            return Ok();\n        }\n\n        [HttpPost(\"slug\")]\n        public async Task<SlugInfoResult> GetSlugInfoBySlugAsync([FromBody] SlugInfoRequest slugInfoRequest)\n        {\n            return await GetSlugInfoAsync(slugInfoRequest.Slug, slugInfoRequest.CultureName);\n        }\n\n        // Wildcard parameters are not supported by OpenAPI (including latest 3.1)\n        // https://stackoverflow.com/a/42880107/507434\n        [Obsolete(\"Use GetSlugInfoBySlug (POST /slug) instead\")]\n        [HttpGet(\"slug/{*slug}\")]\n        public async Task<SlugInfoResult> GetInfoBySlugAsync(string slug, [FromQuery] string culture)\n        {\n            return await GetSlugInfoAsync(slug, culture);\n        }\n\n        // GET: storefrontapi/version\n        [HttpGet(\"version\")]\n        [AllowAnonymous]\n        public ActionResult Version()\n        {\n            return Ok(System.Diagnostics.FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location).FileVersion);\n        }\n\n        private async Task<SlugInfoResult> GetSlugInfoAsync(string slug, string culture)\n        {\n            var result = new SlugInfoResult();\n\n            if (string.IsNullOrEmpty(slug))\n            {\n                return result;\n            }\n\n            var segments = slug.Split(\"/\", StringSplitOptions.RemoveEmptyEntries);\n            var lastSegment = segments.Last();\n            var seoInfos = await _seoInfoService.GetBestMatchingSeoInfos(lastSegment, WorkContext.CurrentStore, culture);\n            var bestSeoInfo = seoInfos.FirstOrDefault();\n            result.EntityInfo = bestSeoInfo;\n\n            if (result.EntityInfo == null || result.EntityInfo.ObjectType == \"ContentFile\")\n            {\n                var pageUrl = slug == \"__index__home__page__\" ? \"/\" : $\"/{slug}\";\n                try\n                {\n                    var pages = WorkContext.Pages.Where(p =>\n                        string.Equals(p.Url, pageUrl, StringComparison.OrdinalIgnoreCase)\n                        || string.Equals(p.Url, slug, StringComparison.OrdinalIgnoreCase)\n                    ).ToList();\n\n                    var page = pages.FirstOrDefault(x => x.Language.CultureName.EqualsInvariant(culture))\n                               ?? pages.FirstOrDefault(x => x.Language.IsInvariant)\n                               ?? pages.FirstOrDefault(x => x.AliasesUrls.Contains(pageUrl, StringComparer.OrdinalIgnoreCase));\n                    result.ContentItem = page;\n\n                }\n                catch\n                {\n                    //do nothing\n                }\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Controllers/Api/ApiStaticContentController.cs",
    "content": "using System.Linq;\nusing System.Net.Mime;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.AspNetCore.Mvc;\nusing VirtoCommerce.LiquidThemeEngine;\nusing VirtoCommerce.Storefront.Domain;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.StaticContent;\nusing VirtoCommerce.Storefront.Models;\n\nnamespace VirtoCommerce.Storefront.Controllers.Api\n{\n    [StorefrontApiRoute(\"content\")]\n    [ResponseCache(CacheProfileName = \"None\")]\n    public class ApiStaticContentController : StorefrontControllerBase\n    {\n        public ApiStaticContentController(IWorkContextAccessor workContextAccessor, IStorefrontUrlBuilder urlBuilder)\n            : base(workContextAccessor, urlBuilder)\n        {\n        }\n\n        // POST: storefrontapi/content/reset-cache\n        [HttpPost(\"reset-cache\")]\n        public ActionResult ResetCache([FromBody] ResetCacheEventModel webHookEvent)\n        {\n            if (TryResetCacheInternal(webHookEvent?.EventBody?.FirstOrDefault()?.Type))\n            {\n                return Ok(\"OK\");\n            }\n            // we can't return 400, because webhook module use it to repeat request\n            return Ok(\"Failed\");\n        }\n\n        // POST: storefrontapi/content/reset-cache/theme\n        [HttpPost(\"reset-cache/{region}\")]\n        public ActionResult ResetCacheRegion([FromRoute] string region)\n        {\n            if (TryResetCacheInternal(region))\n            {\n                return Ok(\"OK\");\n            }\n            // we can't return 400, because webhook module use it to repeat request\n            return Ok(\"Failed\");\n        }\n\n        private static bool TryResetCacheInternal(string region)\n        {\n            switch (region)\n            {\n                case \"theme\":\n                case \"themes\":\n                    ThemeEngineCacheRegion.ExpireRegion();\n                    return true;\n                case \"pages\":\n                case \"blogs\":\n                    StaticContentCacheRegion.ExpireRegion();\n                    return true;\n            }\n            return false;\n        }\n\n        // POST: storefrontapi/content/pages\n        [HttpPost(\"pages\")]\n        [ProducesResponseType(StatusCodes.Status200OK, Type = typeof(object))]\n        [ProducesResponseType(StatusCodes.Status404NotFound)]\n        public ActionResult FindPage([FromBody] ContentInThemeSearchCriteria value)\n        {\n            var permalink = value.Permalink;\n            var result = WorkContext.Pages.FirstOrDefault(x => x.Permalink != null && x.Permalink.EqualsInvariant(permalink));\n            if (result == null)\n            {\n                return NotFound();\n            }\n            return JsonResult(result.Content);\n        }\n\n        [HttpPost(\"templates\")]\n        [ProducesResponseType(StatusCodes.Status200OK, Type = typeof(object))]\n        [ProducesResponseType(StatusCodes.Status404NotFound)]\n        public ActionResult LoadTemplate([FromBody] ContentInThemeSearchCriteria value)\n        {\n            var result = WorkContext.Templates.FirstOrDefault(x => x.Name == value.TemplateName);\n            if (result == null)\n            {\n                return NotFound();\n            }\n            return JsonResult(result.Content);\n        }\n\n        private ActionResult JsonResult(string content)\n        {\n            return Content(content, MediaTypeNames.Application.Json);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Controllers/Api/ApiThemeController.cs",
    "content": "using Microsoft.AspNetCore.Authorization;\nusing Microsoft.AspNetCore.Mvc;\nusing System;\nusing VirtoCommerce.LiquidThemeEngine;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Controllers.Api\n{\n    [Obsolete]\n    [StorefrontApiRoute(\"theme\")]\n    [ResponseCache(CacheProfileName = \"None\")]\n    public class ApiThemeController : StorefrontControllerBase\n    {\n        private readonly ILiquidThemeEngine _liquidThemeEngine;\n        public ApiThemeController(IWorkContextAccessor workContextAccessor, IStorefrontUrlBuilder urlBuilder, ILiquidThemeEngine liquidThemeEngine)\n            : base(workContextAccessor, urlBuilder)\n        {\n            _liquidThemeEngine = liquidThemeEngine;\n        }\n\n        // GET: storefrontapi/theme/context\n        [Obsolete(\"Use store query from GraphQL\")]\n        [HttpGet(\"context\")]\n        [AllowAnonymous]\n        public ActionResult<SpaThemeContext> GetSpaThemeContext()\n        {\n            var result = SpaThemeContext.Create(WorkContext, UrlBuilder);\n            result.Settings = _liquidThemeEngine.GetSettings();\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Controllers/AssetController.cs",
    "content": "using System.IO;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authorization;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.AspNetCore.Mvc;\nusing VirtoCommerce.LiquidThemeEngine;\nusing VirtoCommerce.Storefront.Extensions;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.StaticContent;\n\nnamespace VirtoCommerce.Storefront.Controllers\n{\n    [StorefrontRoute]\n    [AllowAnonymous]\n    public class AssetController : StorefrontControllerBase\n    {\n        private readonly ILiquidThemeEngine _themeEngine;\n        private readonly IContentBlobProvider _contentBlobProvider;\n        private readonly IWebHostEnvironment _hostingEnvironment;\n\n        public AssetController(IWorkContextAccessor workContextAccessor, IStorefrontUrlBuilder urlBuilder, ILiquidThemeEngine themeEngine,\n                               IContentBlobProvider staticContentBlobProvider, IWebHostEnvironment hostingEnvironment)\n            : base(workContextAccessor, urlBuilder)\n        {\n            _themeEngine = themeEngine;\n            _contentBlobProvider = staticContentBlobProvider;\n            _hostingEnvironment = hostingEnvironment;\n        }\n\n        /// <summary>\n        /// GET: /themes/localization.json\n        /// Return localization resources for current theme\n        /// </summary>\n        /// <returns></returns>\n        [HttpGet(\"themes/localization.json\")]\n        [ResponseCache(CacheProfileName = \"Default\")]\n        public ActionResult GetThemeLocalizationJson()\n        {\n            var retVal = _themeEngine.ReadLocalization();\n            return Json(retVal);\n        }\n\n        /// <summary>\n        /// GET: /themes/settings.json\n        /// Return settings for current theme\n        /// </summary>\n        /// <returns></returns>\n        [HttpGet(\"themes/settings.json\")]\n        [ResponseCache(CacheProfileName = \"Default\")]\n        public ActionResult GetThemeSettingsJson()\n        {\n            var retVal = _themeEngine.GetSettings();\n            return Json(retVal);\n        }\n\n        /// <summary>\n        /// GET: /themes/assets/{*path}\n        /// Handle theme assets requests\n        /// </summary>\n        /// <param name=\"path\"></param>\n        /// <returns></returns>\n        [HttpGet(\"themes/assets/{*path}\")]\n        [ResponseCache(CacheProfileName = \"Default\")]\n        public async Task<ActionResult> GetThemeAssets(string path)\n        {\n            var stream = await _themeEngine.GetAssetStreamAsync(path);\n            return stream != null\n                ? File(stream, MimeTypes.GetMimeType(path), true)\n                : HandleStaticFiles(path);\n        }\n\n\n        /// <summary>\n        /// GET: /assets/{*path}\n        /// Handle all static content assets requests\n        /// </summary>\n        /// <param name=\"path\"></param>\n        /// <returns></returns>\n        [HttpGet(\"assets/{*path}\")]\n        [ResponseCache(CacheProfileName = \"Default\")]\n        public ActionResult GetStaticContentAssets(string path)\n        {\n            var blobPath = _contentBlobProvider.Search(Path.Combine(\"Pages\", WorkContext.CurrentStore.Id, \"assets\"), path, true).FirstOrDefault();\n            if (!string.IsNullOrEmpty(blobPath))\n            {\n                var stream = _contentBlobProvider.OpenRead(blobPath);\n                if (stream != null)\n                {\n                    return File(stream, MimeTypes.GetMimeType(blobPath));\n                }\n            }\n\n            return NotFound();\n        }\n\n        /// <summary>\n        /// Serve static files. This controller called from SeoRoute when it cannot find any other routes for request.\n        /// </summary>\n        /// <param name=\"path\"></param>\n        /// <returns></returns>\n        public ActionResult HandleStaticFiles(string path)\n        {\n            path = _hostingEnvironment.MapPath(\"~/\" + path);\n            var mimeType = MimeTypes.GetMimeType(path);\n            if (System.IO.File.Exists(path) && mimeType != \"application/octet-stream\")\n            {\n                return PhysicalFile(path, MimeTypes.GetMimeType(path));\n            }\n            return NotFound();\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Controllers/CommonController.cs",
    "content": "using System;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authorization;\nusing Microsoft.AspNetCore.Identity;\nusing Microsoft.AspNetCore.Mvc;\nusing VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi;\nusing VirtoCommerce.Storefront.Domain;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Middleware;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\nusing VirtoCommerce.Storefront.Model.Security;\nusing VirtoCommerce.Storefront.Models;\n\nnamespace VirtoCommerce.Storefront.Controllers\n{\n    [StorefrontRoute]\n    public class CommonController : StorefrontControllerBase\n    {\n        private readonly IStoreModule _storeApi;\n        private readonly SignInManager<User> _signInManager;\n\n        public CommonController(IWorkContextAccessor workContextAccesor, IStorefrontUrlBuilder urlBuilder, IStoreModule storeApi, SignInManager<User> signInManager)\n            : base(workContextAccesor, urlBuilder)\n        {\n            _storeApi = storeApi;\n            _signInManager = signInManager;\n        }\n\n        /// <summary>\n        /// GET : /resetcache\n        /// </summary>\n        /// <returns></returns>\n        [HttpGet(\"common/resetcache\")]\n        [Authorize(SecurityConstants.Permissions.CanResetCache)]\n        public ActionResult ResetCache()\n        {\n            GlobalCacheRegion.ExpireRegion();\n\n            return StoreFrontRedirect(\"~/\");\n        }\n\n        /// <summary>\n        /// POST : /contact\n        /// </summary>\n        /// <param name=\"model\"></param>\n        /// <param name=\"viewName\"></param>\n        /// <returns></returns>\n        [HttpPost(\"contact/{viewName?}\")]\n        [AllowAnonymous]\n        [ValidateAntiForgeryToken]\n        public async Task<ActionResult> ContactForm([FromForm] ContactForm model, string viewName = \"page.contact\")\n        {\n            await _storeApi.SendDynamicNotificationAnStoreEmailAsync(model.ToServiceModel(WorkContext));\n            if (model.Contact.ContainsKey(\"RedirectUrl\") && model.Contact[\"RedirectUrl\"].Any())\n            {\n                return StoreFrontRedirect(model.Contact[\"RedirectUrl\"].First());\n            }\n            return View(viewName, WorkContext);\n        }\n\n        /// <summary>\n        /// GET: common/setcurrency/{currency}\n        /// Set current currency for current user session\n        /// </summary>\n        /// <param name=\"currency\"></param>\n        /// <param name=\"returnUrl\"></param>\n        /// <returns></returns>\n        //[OutputCache(NoStore = true, Duration = 0, VaryByParam = \"None\")]\n        [HttpGet(\"common/setcurrency/{currency}\")]\n        public async Task<ActionResult> SetCurrency(string currency, string returnUrl = \"\")\n        {\n            WorkContext.CurrentUser.SelectedCurrencyCode = currency;\n            await _signInManager.RefreshSignInAsync(WorkContext.CurrentUser);\n            //home page  and prevent open redirection attack\n            if (string.IsNullOrEmpty(returnUrl) || !Url.IsLocalUrl(returnUrl))\n            {\n                returnUrl = \"~/\";\n            }\n            return StoreFrontRedirect(returnUrl);\n        }\n\n        // GET: common/getcountries/json\n        [Obsolete(\"Use countries query from GraphQL\")]\n        [HttpGet(\"common/getcountries/json\")]\n        public ActionResult GetCountries()\n        {\n            return Json(WorkContext.AllCountries.Select(c => new Country { Name = c.Name, Code2 = c.Code2, Code3 = c.Code3, RegionType = c.RegionType })\n                .ToArray());\n        }\n\n        // GET: common/getregions/{countryCode}/json\n        [Obsolete(\"Use countries or regions query from GraphQL\")]\n        [HttpGet(\"common/getregions/{countryCode}/json\")]\n        public ActionResult GetRegions(string countryCode)\n        {\n            Country country = null;\n\n            if (countryCode != null)\n            {\n                if (countryCode.Length == 3)\n                {\n                    country = WorkContext.AllCountries.FirstOrDefault(c => c.Code3.EqualsInvariant(countryCode));\n                }\n                else if (countryCode.Length == 2)\n                {\n                    country = WorkContext.AllCountries.FirstOrDefault(c => c.Code2.EqualsInvariant(countryCode));\n                }\n            }\n\n            if (country != null)\n            {\n                return Json(country.Regions);\n            }\n\n            return NotFound();\n        }\n\n        // GET: common/maintenance\n        [HttpGet(\"common/maintenance\")]\n        [Route(\"maintenance\")]\n        public ActionResult Maintenance()\n        {\n            return View(\"Maintenance\");\n        }\n\n        /// <summary>\n        /// An internal special method for handling permanent redirection from routing rules\n        /// </summary>\n        /// <param name=\"url\">URL to redirect</param>\n        /// <returns>Redirect to URL</returns>\n        [HttpOptions]\n        public ActionResult InternalRedirect([FromRoute] string url)\n        {\n            return StoreFrontRedirectPermanent(url);\n        }\n\n        // GET: common/notheme\n        [HttpGet(\"common/notheme\")]\n        public ActionResult NoTheme()\n        {\n            if (!HttpContext.Items.TryGetValue(NoLiquidThemeMiddleware.NoThemeModelKey, out var viewModel))\n            {\n                viewModel = new NoThemeViewModel();\n            }\n\n            return View(\"NoTheme\", viewModel);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Controllers/DesignerPreviewController.cs",
    "content": "using Microsoft.AspNetCore.Authorization;\nusing Microsoft.AspNetCore.Mvc;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.StaticContent;\n\nnamespace VirtoCommerce.Storefront.Controllers\n{\n    [StorefrontRoute]\n    [AllowAnonymous]\n    public class DesignerPreviewController : StorefrontControllerBase\n    {\n        public DesignerPreviewController(IWorkContextAccessor workContextAccessor, IStorefrontUrlBuilder urlBuilder)\n            : base(workContextAccessor, urlBuilder)\n        {\n        }\n\n        [HttpGet(\"designer-preview\")]\n        public IActionResult Index()\n        {\n            WorkContext.Layout = Request.Query[\"layout\"].ToString();\n            return View(\"preview\", WorkContext);\n        }\n\n        [HttpPost(\"designer-preview/block\")]\n        //We can't use AntiForgery check here due to IFrame limitations. Browsers don't send cookies from IFrames.\n        //[ValidateAntiForgeryToken]\n        public IActionResult Block([FromBody] dynamic data)\n        {\n            var page = new ContentPage\n            {\n                Content = $@\"{{ \"\"settings\"\": {{}}, \"\"content\"\": [ {data} ] }}\"\n            };\n\n            WorkContext.CurrentPage = page;\n            var viewName = \"json-blocks\";\n\n            return PartialView(viewName, WorkContext);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Controllers/ErrorController.cs",
    "content": "using System.Linq;\nusing System.Text.RegularExpressions;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Diagnostics;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.AspNetCore.Mvc;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Exceptions;\n\nnamespace VirtoCommerce.Storefront.Controllers\n{\n    [StorefrontRoute(\"error\")]\n    public class ErrorController : StorefrontControllerBase\n    {\n        private readonly ISeoInfoService _seoInfoService;\n        private readonly ISpaRouteService _spaRouteService;\n\n        public ErrorController(\n            IWorkContextAccessor workContextAccessor,\n            IStorefrontUrlBuilder urlBuilder,\n            ISeoInfoService seoInfoService,\n            ISpaRouteService spaRouteService)\n            : base(workContextAccessor, urlBuilder)\n        {\n            _seoInfoService = seoInfoService;\n            _spaRouteService = spaRouteService;\n        }\n\n        [Route(\"{errCode}\")]\n        public async Task<IActionResult> Error(int? errCode)\n        {\n            //Returns index page on 404 error when the store.IsSpa flag is activated \n            if (errCode == StatusCodes.Status404NotFound && WorkContext.CurrentStore.IsSpa)\n            {\n                var path = TrimTwoLetterLangSegment(Request.HttpContext.Features.Get<IStatusCodeReExecuteFeature>()?.OriginalPath);\n                Response.StatusCode = StatusCodes.Status404NotFound;\n\n                if (path == \"/\")\n                {\n                    Response.StatusCode = StatusCodes.Status200OK;\n                    return View(\"index\");\n                }\n\n                if (string.IsNullOrEmpty(path))\n                {\n                    return View(\"index\");\n                }\n\n                var slug = path.Split('/').Last();\n                if (!string.IsNullOrEmpty(slug))\n                {\n                    var seoInfos = await _seoInfoService.GetBestMatchingSeoInfos(slug, WorkContext.CurrentStore, WorkContext.CurrentLanguage.CultureName);\n                    Response.StatusCode = seoInfos.Any() ? StatusCodes.Status200OK : StatusCodes.Status404NotFound;\n                }\n\n                if (Response.StatusCode == StatusCodes.Status404NotFound)\n                {\n                    Response.StatusCode = _seoInfoService.GetContentItem($\"/{slug}\", WorkContext) != null ? StatusCodes.Status200OK : StatusCodes.Status404NotFound;\n                }\n\n                if (Response.StatusCode == StatusCodes.Status404NotFound)\n                {\n                    Response.StatusCode = await _spaRouteService.IsSpaRoute(path) ? StatusCodes.Status200OK : StatusCodes.Status404NotFound;\n                }\n\n                return View(\"index\");\n            }\n            var exceptionFeature = base.HttpContext.Features.Get<IExceptionHandlerFeature>();\n            if (exceptionFeature != null && exceptionFeature.Error is StorefrontException storefrontException && storefrontException.View != null)\n            {\n                return View(storefrontException.View);\n            }\n            if (errCode == StatusCodes.Status404NotFound || errCode == StatusCodes.Status500InternalServerError)\n            {\n                return View(errCode.ToString());\n            }\n            return View();\n        }\n\n        [Route(\"AccessDenied\")]\n        public IActionResult AccessDenied()\n        {\n            Response.StatusCode = StatusCodes.Status403Forbidden;\n            return View(\"AccessDenied\");\n        }\n\n        private string TrimTwoLetterLangSegment(string path)\n        {\n            var language = WorkContext.CurrentStore.Languages.FirstOrDefault(x => Regex.IsMatch(path, @\"^/\\b\" + x.TwoLetterLanguageName + @\"\\b/\", RegexOptions.IgnoreCase));\n\n            if (language != null)\n            {\n                path = Regex.Replace(path, @\"/\\b\" + language.TwoLetterLanguageName + @\"\\b/\", \"/\", RegexOptions.IgnoreCase);\n            }\n\n            return path;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Controllers/HomeController.cs",
    "content": "using Microsoft.AspNetCore.Mvc;\nusing VirtoCommerce.Storefront.Infrastructure;\n\nnamespace VirtoCommerce.Storefront.Controllers\n{\n    [StorefrontRoute]\n    public class HomeController : Controller\n    {\n        [HttpGet]\n        public IActionResult Index()\n        {\n            return View(\"index\");\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Controllers/SitemapController.cs",
    "content": "using System;\nusing System.IO;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Mvc;\nusing VirtoCommerce.LiquidThemeEngine;\nusing VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Controllers\n{\n    [StorefrontRoute]\n    public class SitemapController : StorefrontControllerBase\n    {\n        private readonly ISitemapsModuleApiOperations _siteMapApi;\n        private readonly ILiquidThemeEngine _liquidThemeEngine;\n        public SitemapController(IWorkContextAccessor workContextAccessor, IStorefrontUrlBuilder urlBuilder, ISitemapsModuleApiOperations siteMapApi,\n                                 ILiquidThemeEngine themeEngine)\n            : base(workContextAccessor, urlBuilder)\n        {\n            _liquidThemeEngine = themeEngine;\n            _siteMapApi = siteMapApi;\n        }\n\n        /// <summary>\n        /// GET: /sitemap.xml\n        /// Return generated sitemap index sitemap.xml\n        /// </summary>\n        /// <returns></returns>\n        [HttpGet(\"sitemap.xml\")]\n        public async Task<ActionResult> GetSitemapIndex()\n        {\n            var stream = await TryGetSitemapStream(\"sitemap.xml\");\n            if (stream != null)\n            {\n                return File(stream, \"text/xml\");\n            }\n            return NotFound(\"sitemap.xml\");\n        }\n\n        /// <summary>\n        /// GET: /sitemap/sitemap-1.xml\n        /// Return generated sitemap by file\n        /// </summary>\n        /// <returns></returns>\n        [HttpGet(\"sitemap/{sitemapPath}\")]\n        public async Task<ActionResult> GetSitemap(string sitemapPath)\n        {\n            var stream = await TryGetSitemapStream(\"sitemap/\" + sitemapPath);\n            if (stream != null)\n            {\n                return File(stream, \"text/xml\");\n            }\n            return NotFound(sitemapPath);\n        }\n\n\n        private async Task<Stream> TryGetSitemapStream(string filePath)\n        {\n            //If sitemap files have big size for generation on the fly you might place already generated xml files in the theme/assets folder or schedule \n            // execution of GenerateSitemapJob.GenerateStoreSitemap method for pre-generation sitemaps  \n            var stream = await _liquidThemeEngine.GetAssetStreamAsync(filePath);\n            if (stream == null)\n            {\n                var absUrl = UrlBuilder.ToAppAbsolute(\"~/\", WorkContext.CurrentStore, WorkContext.CurrentLanguage);\n                var storeUrl = new Uri(WorkContext.RequestUrl, absUrl).ToString();\n                //remove language from base url SitemapAPI will add it automatically\n                storeUrl = storeUrl.Replace(\"/\" + WorkContext.CurrentLanguage.CultureName + \"/\", \"/\");\n                stream = await _siteMapApi.GenerateSitemapAsync(WorkContext.CurrentStore.Id, storeUrl, filePath);\n            }\n            return stream;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Controllers/StorefrontControllerBase.cs",
    "content": "using Microsoft.AspNetCore.Mvc;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Controllers\n{\n    public class StorefrontControllerBase : Controller\n    {\n        protected IStorefrontUrlBuilder UrlBuilder { get; }\n\n        protected WorkContext WorkContext { get; }\n\n        public StorefrontControllerBase(IWorkContextAccessor workContextAccessor, IStorefrontUrlBuilder urlBuilder)\n        {\n            WorkContext = workContextAccessor.WorkContext;\n            UrlBuilder = urlBuilder;\n        }\n\n        protected RedirectResult StoreFrontRedirect(string url)\n        {\n            var newUrl = Url.IsLocalUrl(url) ? url : \"~/\";\n            var appRelativeUrl = UrlBuilder.ToAppRelative(newUrl, WorkContext.CurrentStore, WorkContext.CurrentLanguage);\n\n            return base.Redirect(appRelativeUrl);\n        }\n\n        protected RedirectResult StoreFrontRedirectPermanent(string url)\n        {\n            var newUrl = Url.IsLocalUrl(url) ? url : \"~/\";\n            var appRelativeUrl = UrlBuilder.ToAppRelative(newUrl, WorkContext.CurrentStore, WorkContext.CurrentLanguage);\n\n            return base.RedirectPermanent(appRelativeUrl);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/DependencyInjection/ServiceCollectionExtension.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Net;\nusing System.Net.Http;\nusing System.Reflection;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Options;\nusing Microsoft.Rest;\nusing VirtoCommerce.LiquidThemeEngine;\nusing VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi;\nusing VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi;\nusing VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi;\nusing VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi;\nusing VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi;\nusing VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi;\nusing VirtoCommerce.Storefront.AutoRestClients.SitemapsModuleApi;\nusing VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi;\nusing VirtoCommerce.Storefront.Domain;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Infrastructure.Autorest;\nusing VirtoCommerce.Storefront.Model.Common.Bus;\nusing VirtoCommerce.Storefront.Model.Common.Events;\nusing VirtoCommerce.Storefront.Model.Common.Messages;\nusing VirtoCommerce.Storefront.Model.StaticContent;\n\nnamespace VirtoCommerce.Storefront.DependencyInjection\n{\n\n    public static class PollyPolicyName\n    {\n        public const string HttpCircuitBreaker = nameof(HttpCircuitBreaker);\n        public const string HttpRetry = nameof(HttpRetry);\n    }\n\n    public static class ServiceCollectionExtension\n    {\n        private const string PlatformEndpointHttpClientName = \"PlatformEndpoint\";\n\n\n        /// <summary>\n        /// Add common http clients handlers and pollicy that will be used to communicate with platform\n        /// </summary>\n        /// <param name=\"services\"></param>\n        /// <returns></returns>\n        private static IServiceCollection AddPlatformEnpointHttpClient(this IServiceCollection services)\n        {\n            services.AddHttpClient(PlatformEndpointHttpClientName)\n                  .ConfigureHttpClient((sp, httpClient) =>\n                  {\n                      var platformEndpointOptions = sp.GetRequiredService<IOptions<PlatformEndpointOptions>>().Value;\n                      httpClient.BaseAddress = platformEndpointOptions.Url;\n                      httpClient.Timeout = platformEndpointOptions.RequestTimeout;\n                  })\n                   .ConfigurePrimaryHttpMessageHandler(x => new HttpClientHandler() { AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate, UseCookies = false })\n                   .AddHttpMessageHandler(sp => sp.GetService<AuthenticationHandlerFactory>().CreateAuthHandler());\n\n\n            return services;\n        }\n        /// <summary>\n        ///  init autorest generated ServiceClient instance with platform enpoint HttpClient and add it into DI services as singlton\n        /// </summary>\n        /// <typeparam name=\"TServiceClient\"></typeparam>\n        /// <param name=\"services\"></param>\n        /// <param name=\"serviceClientFactory\"></param>\n        /// <returns></returns>\n        private static IServiceCollection AddAutoRestClient<TServiceClient>(this IServiceCollection services, Func<ServiceClientCredentials, HttpClient, bool, Uri, TServiceClient> serviceClientFactory)\n            where TServiceClient : ServiceClient<TServiceClient>\n        {\n            services.AddSingleton(sp =>\n            {\n                var platformEndpointOptions = sp.GetRequiredService<IOptions<PlatformEndpointOptions>>().Value;\n                var httpClientFactory = sp.GetRequiredService<IHttpClientFactory>();\n                var httpClient = httpClientFactory.CreateClient(PlatformEndpointHttpClientName);\n                var serviceClient = serviceClientFactory(new EmptyServiceClientCredentials(), httpClient, true, platformEndpointOptions.Url);\n                return serviceClient;\n            });\n\n            return services;\n        }\n\n        public static void AddPlatformEndpoint(this IServiceCollection services, Action<PlatformEndpointOptions> setupAction = null)\n        {\n            ServicePointManager.UseNagleAlgorithm = false;\n            services.AddSingleton<ServiceClientCredentials>(sp => new EmptyServiceClientCredentials());\n            services.AddTransient<ApiKeySecretAuthHandler>();\n            services.AddTransient<UserPasswordAuthHandler>();\n            services.AddTransient<ClientCredentialsAuthHandler>();\n            services.AddSingleton<AuthenticationHandlerFactory>();\n            services.AddHttpClient();\n            services.AddPlatformEnpointHttpClient();\n            services.AddAutoRestClient((credentials, httpClient, disposeHttpClient, baseUri) => new StoreModuleClient(credentials, httpClient, disposeHttpClient) { BaseUri = baseUri });\n            services.AddSingleton<IStoreModule>(sp => new StoreModule(sp.GetRequiredService<StoreModuleClient>()));\n            services.AddAutoRestClient((credentials, httpClient, disposeHttpClient, baseUri) => new CoreModuleClient(credentials, httpClient, disposeHttpClient) { BaseUri = baseUri });\n            services.AddSingleton<ICommerce>(sp => new Commerce(sp.GetRequiredService<CoreModuleClient>()));\n\n            services.AddAutoRestClient((credentials, httpClient, disposeHttpClient, baseUri) => new CatalogModuleClient(credentials, httpClient, disposeHttpClient) { BaseUri = baseUri });\n            services.AddSingleton<ICatalogModuleCategories>(sp => new CatalogModuleCategories(sp.GetRequiredService<CatalogModuleClient>()));\n            services.AddSingleton<ICatalogModuleProducts>(sp => new CatalogModuleProducts(sp.GetRequiredService<CatalogModuleClient>()));\n\n\n            services.AddAutoRestClient((credentials, httpClient, disposeHttpClient, baseUri) => new PlatformModuleClient(credentials, httpClient, disposeHttpClient) { BaseUri = baseUri });\n            services.AddSingleton<ISecurity>(sp => new Security(sp.GetRequiredService<PlatformModuleClient>()));\n            services.AddAutoRestClient((credentials, httpClient, disposeHttpClient, baseUri) => new NotificationsModuleClient(credentials, httpClient, disposeHttpClient) { BaseUri = baseUri });\n            services.AddSingleton<INotifications>(sp => new Notifications(sp.GetRequiredService<NotificationsModuleClient>()));\n            services.AddAutoRestClient((credentials, httpClient, disposeHttpClient, baseUri) => new CustomerModuleClient(credentials, httpClient, disposeHttpClient) { BaseUri = baseUri });\n            services.AddSingleton<ICustomerModule>(sp => new CustomerModule(sp.GetRequiredService<CustomerModuleClient>()));\n\n            services.AddAutoRestClient((credentials, httpClient, disposeHttpClient, baseUri) => new ContentModuleClient(credentials, httpClient, disposeHttpClient) { BaseUri = baseUri });\n            services.AddSingleton<IMenu>(sp => new Menu(sp.GetRequiredService<ContentModuleClient>()));\n            services.AddSingleton<IContent>(sp => new Content(sp.GetRequiredService<ContentModuleClient>()));\n            services.AddAutoRestClient((credentials, httpClient, disposeHttpClient, baseUri) => new SitemapsModuleClient(credentials, httpClient, disposeHttpClient) { BaseUri = baseUri });\n            services.AddSingleton<ISitemapsModuleApiOperations>(sp => new SitemapsModuleApiOperations(sp.GetRequiredService<SitemapsModuleClient>()));\n\n            services.AddAutoRestClient((credentials, httpClient, disposeHttpClient, baseUri) => new PlatformModuleClient(credentials, httpClient, disposeHttpClient) { BaseUri = baseUri });\n            services.AddSingleton<IChangeLog>(sp => new ChangeLog(sp.GetRequiredService<PlatformModuleClient>()));\n\n\n\n            if (setupAction != null)\n            {\n                services.Configure(setupAction);\n            }\n        }\n\n        public static void AddFileSystemBlobContent(this IServiceCollection services, Action<FileSystemBlobContentOptions> setupAction = null)\n        {\n            services.AddSingleton<IContentBlobProvider, FileSystemContentBlobProvider>();\n            if (setupAction != null)\n            {\n                services.Configure(setupAction);\n            }\n        }\n\n        public static void AddAzureBlobContent(this IServiceCollection services, Action<AzureBlobContentOptions> setupAction = null)\n        {\n            services.AddSingleton<IContentBlobProvider, AzureBlobContentProvider>();\n            if (setupAction != null)\n            {\n                services.Configure(setupAction);\n            }\n        }\n\n        public static void AddLiquidViewEngine(this IServiceCollection services, Action<LiquidThemeEngineOptions> setupAction = null)\n        {\n            if (services == null)\n            {\n                throw new ArgumentNullException(nameof(services));\n            }\n\n            services.AddSingleton<ISassFileManager, SassFileManager>();\n            services.AddSingleton<ILiquidThemeEngine, ShopifyLiquidThemeEngine>();\n            services.AddSingleton<ILiquidViewEngine, LiquidThemedViewEngine>();\n            if (setupAction != null)\n            {\n                services.Configure(setupAction);\n            }\n        }\n\n        //Register event handlers through reflection\n        public static void RegisterAssembliesEventHandlers(this IServiceCollection services, params Type[] typesFromAssemblyContainingMessages)\n        {\n            //Scan for eventhandlers\n            services.Scan(scan => scan\n                .FromAssemblies(typesFromAssemblyContainingMessages.Select(x => x.Assembly))\n                    .AddClasses(classes => classes.Where(x =>\n                    {\n                        var allInterfaces = x.GetInterfaces();\n                        return\n                            allInterfaces.Any(y => y.GetTypeInfo().IsGenericType && y.GetTypeInfo().GetGenericTypeDefinition() == typeof(IHandler<>)) ||\n                            allInterfaces.Any(y => y.GetTypeInfo().IsGenericType && y.GetTypeInfo().GetGenericTypeDefinition() == typeof(ICancellableHandler<>));\n                    }))\n                    .AsSelf()\n                    .WithTransientLifetime()\n            );\n\n            var serviceProvider = services.BuildServiceProvider();\n            var handlerRegistrar = serviceProvider.GetService<IHandlerRegistrar>();\n\n            foreach (var typesFromAssemblyContainingMessage in typesFromAssemblyContainingMessages)\n            {\n                var executorsAssembly = typesFromAssemblyContainingMessage.GetTypeInfo().Assembly;\n                var executorTypes = executorsAssembly\n                    .GetTypes()\n                    .Select(t => new { Type = t, Interfaces = ResolveMessageHandlerInterface(t) })\n                    .Where(e => e.Interfaces != null && e.Interfaces.Any());\n\n                foreach (var executorType in executorTypes)\n                {\n                    foreach (var @interface in executorType.Interfaces)\n                    {\n                        InvokeHandler(@interface, handlerRegistrar, executorType.Type, serviceProvider);\n                    }\n                }\n            }\n        }\n\n        private static void InvokeHandler(Type @interface, IHandlerRegistrar registrar, Type executorType, ServiceProvider serviceProvider)\n        {\n            var commandType = @interface.GetGenericArguments()[0];\n\n            var registerExecutorMethod = registrar\n                .GetType()\n                .GetMethods(BindingFlags.Instance | BindingFlags.Public)\n                .Where(mi => mi.Name == \"RegisterHandler\")\n                .Where(mi => mi.IsGenericMethod)\n                .Where(mi => mi.GetGenericArguments().Length == 1)\n                .Single(mi => mi.GetParameters().Length == 1)\n                .MakeGenericMethod(commandType);\n\n            Func<dynamic, CancellationToken, Task> del;\n            if (IsCancellable(@interface))\n            {\n                del = (x, token) =>\n                {\n                    dynamic handler = serviceProvider.GetService(executorType);\n                    return handler.Handle(x, token);\n                };\n            }\n            else\n            {\n                del = (x, token) =>\n                {\n                    dynamic handler = serviceProvider.GetService(executorType);\n                    return handler.Handle(x);\n                };\n            }\n\n            registerExecutorMethod.Invoke(registrar, new object[] { del });\n        }\n\n        private static bool IsCancellable(Type @interface)\n        {\n            return @interface.GetGenericTypeDefinition() == typeof(ICancellableEventHandler<>);\n        }\n\n        private static IEnumerable<Type> ResolveMessageHandlerInterface(Type type)\n        {\n            return type\n                .GetInterfaces()\n                .Where(i => i.GetTypeInfo().IsGenericType && (i.GetGenericTypeDefinition() == typeof(IEventHandler<>)\n                             || i.GetGenericTypeDefinition() == typeof(ICancellableEventHandler<>)));\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Common/AddressConverter.cs",
    "content": "using System;\nusing System.Linq;\nusing VirtoCommerce.Storefront.Model;\nusing coreDto = VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi.Models;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public static class AddressConverter\n    {\n        public static Address ToAddress(this coreDto.Address addressDto)\n        {\n            var retVal = new Address\n            {\n                Key = addressDto.Key,\n                City = addressDto.City,\n                CountryCode = addressDto.CountryCode,\n                CountryName = addressDto.CountryName,\n                Email = addressDto.Email,\n                FirstName = addressDto.FirstName,\n                LastName = addressDto.LastName,\n                Line1 = addressDto.Line1,\n                Line2 = addressDto.Line2,\n                MiddleName = addressDto.MiddleName,\n                Name = addressDto.Name,\n                Organization = addressDto.Organization,\n                Phone = addressDto.Phone,\n                PostalCode = addressDto.PostalCode,\n                RegionId = addressDto.RegionId,\n                RegionName = addressDto.RegionName,\n                Zip = addressDto.Zip,\n\n                Type = (AddressType)Enum.Parse(typeof(AddressType), addressDto.AddressType, true)\n            };\n            return retVal;\n        }\n\n        public static coreDto.Address ToCoreAddressDto(this Address address)\n        {\n            var retVal = new coreDto.Address\n            {\n                Key = address.Key,\n                City = address.City,\n                CountryCode = address.CountryCode,\n                CountryName = address.CountryName,\n                Email = address.Email,\n                FirstName = address.FirstName,\n                LastName = address.LastName,\n                Line1 = address.Line1,\n                Line2 = address.Line2,\n                MiddleName = address.MiddleName,\n                Name = address.Name,\n                Organization = address.Organization,\n                Phone = address.Phone,\n                PostalCode = address.PostalCode,\n                RegionId = address.RegionId,\n                RegionName = address.RegionName,\n                Zip = address.Zip,\n\n                AddressType = address.Type.ToString()\n            };\n\n            return retVal;\n        }\n\n\n        public static Address ToWebModel(this Address address, Country[] countries)\n        {\n            var result = new Address();\n            result.CopyFrom(address, countries);\n            return result;\n        }\n\n\n        public static Address CopyFrom(this Address result, Address address, Country[] countries)\n        {\n            result.City = address.City;\n            result.CountryCode = address.CountryCode;\n            result.FirstName = address.FirstName;\n            result.LastName = address.LastName;\n            result.Name = address.Name;\n            result.Phone = address.Phone;\n            result.Zip = address.Zip;\n            result.Organization = address.Company;\n            result.CountryName = address.Country;\n            result.PostalCode = address.Zip;\n            result.Line1 = address.Address1;\n            result.Line2 = address.Address2;\n            result.RegionName = address.Province;\n\n            result.Name = result.ToString();\n\n            var country = countries.FirstOrDefault(c => string.Equals(c.Name, address.Country, StringComparison.OrdinalIgnoreCase));\n            if (country != null)\n            {\n                result.CountryCode = country.Code3;\n\n                if (address.Province != null && country.Regions != null)\n                {\n                    var region = country.Regions.FirstOrDefault(r => string.Equals(r.Name, address.Province, StringComparison.OrdinalIgnoreCase));\n\n                    if (region != null)\n                    {\n                        result.RegionId = region.Code;\n                    }\n                }\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Common/ContactUsFormConverter.cs",
    "content": "using System.Linq;\nusing VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.Models;\nusing VirtoCommerce.Storefront.Model;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public static class ContactUsFormConverter\n    {\n        public static SendDynamicNotificationRequest ToServiceModel(this ContactForm contactUsForm, WorkContext workContext)\n        {\n            var retVal = new SendDynamicNotificationRequest\n            {\n                Language = workContext.CurrentLanguage.CultureName,\n                StoreId = workContext.CurrentStore.Id,\n                Type = contactUsForm.FormType,\n                Fields = contactUsForm.Contact.ToDictionary(x => x.Key, x => x.Value != null ? string.Join(\", \", x.Value) : string.Empty)\n            };\n            return retVal;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Common/CurrencyConverter.cs",
    "content": "using VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing coreDto = VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi.Models;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public static class CurrencyConverter\n    {\n        public static Currency ToCurrency(this coreDto.Currency currency, Language language)\n        {\n            var retVal = new Currency(language, currency.Code, currency.Name, currency.Symbol, (decimal)currency.ExchangeRate.Value)\n            {\n                CustomFormatting = currency.CustomFormatting\n            };\n            return retVal;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Common/DynamicPropertyConverter.cs",
    "content": "using System.Globalization;\nusing System.Linq;\nusing Newtonsoft.Json.Linq;\nusing VirtoCommerce.Storefront.Model;\nusing platformDto = VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public static class DynamicPropertyConverter\n    {\n        public static DynamicProperty ToDynamicProperty(this platformDto.DynamicObjectProperty propertyDto)\n        {\n            var result = new DynamicProperty();\n\n            result.Id = propertyDto.Id;\n            result.IsArray = propertyDto.IsArray ?? false;\n            result.IsDictionary = propertyDto.IsDictionary ?? false;\n            result.IsRequired = propertyDto.IsRequired ?? false;\n            result.Name = propertyDto.Name;\n            result.ValueType = propertyDto.ValueType;\n\n            if (propertyDto.DisplayNames != null)\n            {\n                result.DisplayNames = propertyDto.DisplayNames.Select(x => new LocalizedString(new Language(x.Locale), x.Name)).ToList();\n            }\n\n            if (propertyDto.Values != null)\n            {\n                if (result.IsDictionary)\n                {\n                    var dictValues = propertyDto.Values\n                        .Where(x => x.Value != null)\n                        .Select(x => x.Value)\n                        .Cast<JObject>()\n                        .Select(x => x.ToObject<platformDto.DynamicPropertyDictionaryItem>())\n                        .ToArray();\n\n                    result.DictionaryValues = dictValues.Select(x => x.ToDictItem()).ToList();\n                }\n                else\n                {\n                    result.Values = propertyDto.Values\n                        .Where(x => x.Value != null)\n                        .Select(x => x.ToLocalizedString())\n                        .ToList();\n                }\n            }\n\n            return result;\n        }\n\n\n        public static platformDto.DynamicObjectProperty ToDynamicPropertyDto(this DynamicProperty dynamicProperty)\n        {\n            var result = new platformDto.DynamicObjectProperty();\n\n            result.Id = dynamicProperty.Id;\n            result.IsArray = dynamicProperty.IsArray;\n            result.IsDictionary = dynamicProperty.IsDictionary;\n            result.IsRequired = dynamicProperty.IsRequired;\n            result.Name = dynamicProperty.Name;\n            result.ValueType = dynamicProperty.ValueType;\n\n            if (dynamicProperty.Values != null)\n            {\n                result.Values = dynamicProperty.Values.Select(v => v.ToPropertyValueDto()).ToList();\n            }\n            else if (dynamicProperty.DictionaryValues != null)\n            {\n                result.Values = dynamicProperty.DictionaryValues.Select(x => x.ToPropertyValueDto()).ToList();\n            }\n\n            return result;\n        }\n\n        private static DynamicPropertyDictionaryItem ToDictItem(this platformDto.DynamicPropertyDictionaryItem dto)\n        {\n            var result = new DynamicPropertyDictionaryItem();\n            result.Id = dto.Id;\n            result.Name = dto.Name;\n            result.PropertyId = dto.PropertyId;\n            if (dto.DisplayNames != null)\n            {\n                result.DisplayNames = dto.DisplayNames.Select(x => new LocalizedString(new Language(x.Locale), x.Name)).ToList();\n            }\n            return result;\n        }\n\n        private static LocalizedString ToLocalizedString(this platformDto.DynamicPropertyObjectValue dto)\n        {\n            return new LocalizedString(new Language(dto.Locale), string.Format(CultureInfo.InvariantCulture, \"{0}\", dto.Value));\n        }\n\n        private static platformDto.DynamicPropertyObjectValue ToPropertyValueDto(this DynamicPropertyDictionaryItem dictItem)\n        {\n            var result = new platformDto.DynamicPropertyObjectValue { Value = dictItem };\n            return result;\n        }\n\n        private static platformDto.DynamicPropertyObjectValue ToPropertyValueDto(this LocalizedString dynamicPropertyObjectValue)\n        {\n            var result = new platformDto.DynamicPropertyObjectValue\n            {\n                Value = dynamicPropertyObjectValue.Value,\n                Locale = dynamicPropertyObjectValue.Language.CultureName\n            };\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Common/NotificationConverter.cs",
    "content": "using System.Linq;\nusing VirtoCommerce.Storefront.AutoRestClients.NotificationsModuleApi.Models;\nusing VirtoCommerce.Storefront.Model.Common.Notifications;\n\nnamespace VirtoCommerce.Storefront.Domain.Common\n{\n    public static class NotificationConverter\n    {\n        public static NotificationRequest ToNotificationDto(this NotificationBase notification)\n        {\n            var result = new NotificationRequest\n            {\n                Language = notification.Language.CultureName,\n                ObjectId = notification.StoreId,\n                ObjectTypeId = \"Store\",\n                Type = notification.Type,\n                NotificationParameters = notification.GetNotificationParameters().Select(x => new NotificationParameter { Type = \"String\", Value = x.Value, ParameterName = x.Key }).ToList()\n            };\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Common/SeoInfoConverter.cs",
    "content": "using VirtoCommerce.Storefront.Model;\nusing coreDto = VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi.Models;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public static class SeoInfoConverter\n    {\n        public static SeoInfo ToSeoInfo(this coreDto.SeoInfo seoDto)\n        {\n            var retVal = new SeoInfo\n            {\n                Id = seoDto.Id,\n                ObjectId = seoDto.ObjectId,\n                ObjectType = seoDto.ObjectType,\n                IsActive = seoDto.IsActive,\n\n                MetaDescription = seoDto.MetaDescription,\n                MetaKeywords = seoDto.MetaKeywords,\n\n                Slug = seoDto.SemanticUrl,\n                Title = seoDto.PageTitle,\n                Language = string.IsNullOrEmpty(seoDto.LanguageCode) ? Language.InvariantLanguage : new Language(seoDto.LanguageCode)\n            };\n            return retVal;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Common/SettingConverter.cs",
    "content": "using System.Linq;\nusing VirtoCommerce.Storefront.Model;\nusing platformDto = VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public static class SettingConverter\n    {\n        public static SettingEntry ToSettingEntry(this platformDto.ObjectSettingEntry settingDto)\n        {\n            var retVal = new SettingEntry\n            {\n                DefaultValue = settingDto.DefaultValue,\n                IsArray = false,\n                Name = settingDto.Name,\n                Value = settingDto.Value,\n                ValueType = settingDto.ValueType\n            };\n            if (settingDto.AllowedValues != null)\n            {\n                retVal.AllowedValues = settingDto.AllowedValues.ToList();\n            }\n            return retVal;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Common/ToolsConverter.cs",
    "content": "using System.Linq;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Stores;\nusing toolsDto = VirtoCommerce.Tools.Models;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public static class ToolsConverter\n    {\n        public static toolsDto.UrlBuilderContext ToToolsContext(this WorkContext workContext)\n        {\n            return new toolsDto.UrlBuilderContext\n            {\n                CurrentUrl = workContext.RequestUrl?.ToString(),\n                CurrentLanguage = workContext.CurrentLanguage?.CultureName,\n                CurrentStore = workContext.CurrentStore.ToToolsStore(),\n                AllStores = workContext.AllStores?.Select(ToToolsStore).ToList(),\n            };\n        }\n\n        public static toolsDto.Store ToToolsStore(this Store store)\n        {\n            toolsDto.Store result = null;\n\n            if (store != null)\n            {\n                result = new toolsDto.Store\n                {\n                    Id = store.Id,\n                    Url = store.Url,\n                    SecureUrl = store.SecureUrl,\n                    Catalog = store.Catalog,\n                    DefaultLanguage = store.DefaultLanguage.CultureName,\n                    SeoLinksType = store.SeoLinksType.ToToolsSeoLinksType(),\n                    Languages = store.Languages.Select(l => l.CultureName).ToList(),\n                };\n            }\n\n            return result;\n        }\n\n        public static toolsDto.SeoLinksType ToToolsSeoLinksType(this SeoLinksType seoLinksType)\n        {\n            return EnumUtility.SafeParse(seoLinksType.ToString(), toolsDto.SeoLinksType.None);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/ContentBlobProviders/AzureBlobContentOptions.cs",
    "content": "using System;\nusing Microsoft.WindowsAzure.Storage.Blob;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class AzureBlobContentOptions\n    {\n        public string Container { get; set; }\n        public string ConnectionString { get; set; }\n        public bool PollForChanges { get; set; } = false;\n        public TimeSpan ChangesPollingInterval { get; set; } = TimeSpan.FromSeconds(15);\n        public BlobRequestOptions BlobRequestOptions { get; set; } = new BlobRequestOptions();\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/ContentBlobProviders/AzureBlobContentProvider.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.Caching.Memory;\nusing Microsoft.Extensions.Options;\nusing Microsoft.Extensions.Primitives;\nusing Microsoft.WindowsAzure.Storage;\nusing Microsoft.WindowsAzure.Storage.Blob;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\nusing VirtoCommerce.Storefront.Model.Common.Exceptions;\nusing VirtoCommerce.Storefront.Model.StaticContent;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class AzureBlobContentProvider : IContentBlobProvider\n    {\n        private readonly CloudBlobClient _cloudBlobClient;\n        private readonly CloudBlobContainer _container;\n        private readonly IStorefrontMemoryCache _memoryCache;\n        private readonly AzureBlobContentOptions _options;\n        private readonly IBlobChangesWatcher _watcher;\n\n        public AzureBlobContentProvider(IOptions<AzureBlobContentOptions> options, IStorefrontMemoryCache memoryCache, IBlobChangesWatcher watcher)\n        {\n            _options = options.Value;\n            _memoryCache = memoryCache;\n\n            if (!CloudStorageAccount.TryParse(_options.ConnectionString, out var cloudStorageAccount))\n            {\n                throw new StorefrontException(\"Failed to get valid connection string\");\n            }\n            _cloudBlobClient = cloudStorageAccount.CreateCloudBlobClient();\n            _container = _cloudBlobClient.GetContainerReference(_options.Container);\n            _watcher = watcher;\n        }\n\n        #region IContentBlobProvider Members\n        /// <summary>\n        /// Open blob for read \n        /// </summary>\n        /// <param name=\"path\">blob relative path /folder/blob.md</param>\n        /// <returns></returns>\n        public virtual Stream OpenRead(string path)\n        {\n            return OpenReadAsync(path).GetAwaiter().GetResult();\n        }\n\n        public virtual Task<Stream> OpenReadAsync(string path)\n        {\n            if (string.IsNullOrEmpty(path))\n            {\n                throw new ArgumentNullException(nameof(path));\n            }\n            path = NormalizePath(path);\n\n            return OpenReadInternalAsync(path);\n        }\n\n        protected virtual async Task<Stream> OpenReadInternalAsync(string path)\n        {\n            path = NormalizePath(path);\n\n            Stream result = null;\n            try\n            {\n                result = await _container.GetBlobReference(path).OpenReadAsync();\n            }\n            catch (Exception)\n            {\n                //we should not throw an exception for the missed directories and return null as result, because the Azure blob storage does not allow us to check if directories exist\n                //and PathExists method will always return true for these paths.                \n                if (!string.IsNullOrEmpty(Path.GetExtension(path)))\n                {\n                    //Throw the not found exception for files\n                    throw;\n                }\n            }\n            return result;\n        }\n\n        /// <summary>\n        /// Open blob for write by path\n        /// </summary>\n        /// <param name=\"path\"></param>\n        /// <returns>blob stream</returns>\n        public virtual Stream OpenWrite(string path)\n        {\n            return OpenWriteAsync(path).GetAwaiter().GetResult();\n        }\n\n        public virtual async Task<Stream> OpenWriteAsync(string path)\n        {\n            //Container name\n            path = NormalizePath(path);\n            var blob = _container.GetBlockBlobReference(path);\n            blob.Properties.ContentType = MimeTypes.GetMimeType(Path.GetFileName(path));\n            return await blob.OpenWriteAsync();\n        }\n\n        /// <summary>\n        /// Check that blob or folder with passed path exist\n        /// </summary>\n        /// <param name=\"path\">path /folder/blob.md</param>\n        /// <returns></returns>\n        public virtual bool PathExists(string path)\n        {\n            return PathExistsAsync(path).GetAwaiter().GetResult();\n        }\n\n        public virtual async Task<bool> PathExistsAsync(string path)\n        {\n            path = NormalizePath(path);\n            var cacheKey = CacheKey.With(GetType(), \"PathExistsAsync\", path);\n            return await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n           {\n               cacheEntry.AddExpirationToken(ContentBlobCacheRegion.CreateChangeToken());\n\n               var isDirectory = string.IsNullOrEmpty(Path.GetExtension(path));\n               var result = false;\n\n               if (isDirectory)\n               {\n                   //There is only one way to check if the blob directory exists is to request its contents.\n                   BlobContinuationToken token = null;\n                   var operationContext = new OperationContext();\n                   var directory = GetCloudBlobDirectory(path);\n                   var resultSegment = await directory.ListBlobsSegmentedAsync(true, BlobListingDetails.Metadata, 1, token, _options.BlobRequestOptions, operationContext);\n                   result = resultSegment.Results.Any();\n               }\n               else\n               {\n                   try\n                   {\n                       var url = GetAbsoluteUrl(path);\n                       result = await (await _cloudBlobClient.GetBlobReferenceFromServerAsync(new Uri(url))).ExistsAsync();\n                   }\n                   catch (Exception)\n                   {\n                       //Azure blob storage client does not provide method to check blob url exist without throwing exception\n                   }\n               }\n\n               return result;\n           });\n        }\n\n\n        /// <summary>\n        /// Search blob content in specified folder\n        /// </summary>\n        /// <param name=\"path\">folder path in which the search will be processed</param>\n        /// <param name=\"searchPattern\">search blob name pattern can be used mask (*, ? symbols)</param>\n        /// <param name=\"recursive\"> recursive search</param>\n        /// <returns>Returns relative path for all found blobs  example: /folder/blob.md </returns>\n        public virtual IEnumerable<string> Search(string path, string searchPattern, bool recursive)\n        {\n            return SearchAsync(path, searchPattern, recursive).GetAwaiter().GetResult();\n        }\n\n        public virtual async Task<IEnumerable<string>> SearchAsync(string path, string searchPattern, bool recursive)\n        {\n            var retVal = new List<string>();\n            path = NormalizePath(path);\n            //Search pattern may contains a part of path /path/*.jpg then need to add this part to a base path\n            searchPattern = searchPattern.Replace('\\\\', '/').TrimStart('/');\n            var subDir = NormalizePath(Path.GetDirectoryName(searchPattern));\n            if (!string.IsNullOrEmpty(subDir))\n            {\n                path = path.TrimEnd('/') + \"/\" + subDir;\n                searchPattern = Path.GetFileName(searchPattern);\n            }\n\n            //Try to check that passed search pattern doesn't contain mask wildcard characters\n            //this means that a direct link to the resource is passed, and we do not need to perform any search\n            var directPath = Path.Combine(path, searchPattern);\n\n            if (!searchPattern.FilePathHasMaskChars() && await PathExistsAsync(directPath))\n            {\n                retVal.Add(directPath);\n            }\n            else\n            {\n                var blobItems = new List<IListBlobItem>();\n                BlobContinuationToken token = null;\n                var operationContext = new OperationContext();\n                var directory = GetCloudBlobDirectory(path);\n\n                do\n                {\n                    var resultSegment = await directory.ListBlobsSegmentedAsync(recursive, BlobListingDetails.Metadata, null, token, _options.BlobRequestOptions, operationContext);\n                    token = resultSegment.ContinuationToken;\n                    blobItems.AddRange(resultSegment.Results);\n                } while (token != null);\n\n                // Loop over items within the container and output the length and URI.\n                foreach (var item in blobItems)\n                {\n                    if (!(item is CloudBlockBlob block))\n                    {\n                        continue;\n                    }\n\n                    var blobRelativePath = GetRelativeUrl(block.Uri.ToString());\n                    var fileName = Path.GetFileName(Uri.UnescapeDataString(block.Uri.ToString()));\n\n                    if (fileName.FitsMask(searchPattern))\n                    {\n                        retVal.Add(blobRelativePath);\n                    }\n                }\n            }\n            return retVal;\n        }\n\n        public virtual IChangeToken Watch(string path)\n        {\n            return _watcher.CreateBlobChangeToken(NormalizePath(path));\n        }\n        #endregion\n\n        protected virtual CloudBlobDirectory GetCloudBlobDirectory(string path)\n        {\n            var isPathToFile = !string.IsNullOrEmpty(Path.GetExtension(path));\n            if (isPathToFile)\n            {\n                path = NormalizePath(Path.GetDirectoryName(path));\n            }\n            return _container.GetDirectoryReference(path);\n        }\n\n        protected virtual string NormalizePath(string path)\n        {\n            return path.Replace('\\\\', '/').TrimStart('/');\n        }\n\n        protected virtual string GetRelativeUrl(string url)\n        {\n            var absoluteUrl = GetAbsoluteUrl(\"\");\n            return url.Replace(absoluteUrl, string.Empty);\n        }\n\n        protected virtual string GetAbsoluteUrl(string path)\n        {\n            var builder = new UriBuilder(_cloudBlobClient.BaseUri);\n            builder.Path += string.Join(\"/\", _options.Container, path).Replace(\"//\", \"/\");\n            return builder.Uri.ToString();\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/ContentBlobProviders/BlobConnectionString.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    /// <summary>\n    /// Represent blob resources connection string which can contains complex part as Provider, basepath etc\n    /// </summary>\n    public class BlobConnectionString\n    {\n        private BlobConnectionString()\n        {\n        }\n        public string Provider { get; private set; }\n        /// <summary>\n        /// root path. Base for blob resources\n        /// </summary>\n        public string RootPath { get; private set; }\n        public string ConnectionString { get; private set; }\n\n        public static BlobConnectionString Parse(string inputString)\n        {\n            if (string.IsNullOrEmpty(inputString))\n                throw new ArgumentNullException(nameof(inputString));\n\n            var retVal = new BlobConnectionString();\n            var pairs = ToDictionary(inputString, \";\", \"=\");\n            if (pairs.ContainsKey(\"provider\"))\n            {\n                retVal.Provider = pairs[\"provider\"];\n                pairs.Remove(\"provider\");\n            }\n            if (pairs.ContainsKey(\"rootPath\"))\n            {\n                retVal.RootPath = pairs[\"rootPath\"];\n                pairs.Remove(\"rootPath\");\n            }\n            retVal.ConnectionString = ToString(pairs, \";\", \"=\");\n            return retVal;\n        }\n\n        private static Dictionary<string, string> ToDictionary(string sourceString, string pairSeparator, string valueSeparator)\n        {\n            return sourceString.Split(new[] { pairSeparator }, StringSplitOptions.RemoveEmptyEntries)\n                .Select(x => x.Split(new[] { valueSeparator }, 2, StringSplitOptions.RemoveEmptyEntries))\n                .ToDictionary(x => x[0], x => x.Length == 2 ? x[1] : string.Empty, StringComparer.OrdinalIgnoreCase);\n        }\n\n        public static string ToString(IEnumerable<KeyValuePair<string, string>> pairs, string pairSeparator, string valueSeparator)\n        {\n            var builder = new StringBuilder();\n\n            foreach (var pair in pairs)\n            {\n                if (builder.Length > 0)\n                {\n                    builder.Append(pairSeparator);\n                }\n                builder.Append(pair.Key);\n                builder.Append(valueSeparator);\n                builder.Append(pair.Value);\n            }\n\n            return builder.ToString();\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/ContentBlobProviders/ContentBlobCacheRegion.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common.Caching;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class ContentBlobCacheRegion : CancellableCacheRegion<ContentBlobCacheRegion>\n    {\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/ContentBlobProviders/FileSystemBlobContentOptions.cs",
    "content": "namespace VirtoCommerce.Storefront.Domain\n{\n    public class FileSystemBlobContentOptions\n    {\n        //The root path \n        public string Path { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/ContentBlobProviders/FileSystemContentBlobProvider.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing Microsoft.Extensions.Caching.Memory;\nusing Microsoft.Extensions.FileProviders;\nusing Microsoft.Extensions.Options;\nusing Microsoft.Extensions.Primitives;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\nusing VirtoCommerce.Storefront.Model.StaticContent;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class FileSystemContentBlobProvider : IContentBlobProvider\n    {\n        private readonly FileSystemBlobContentOptions _options;\n        private readonly IStorefrontMemoryCache _memoryCache;\n        private readonly PhysicalFileProvider _physicalFileProvider;\n\n        public FileSystemContentBlobProvider(IOptions<FileSystemBlobContentOptions> options, IStorefrontMemoryCache memoryCache)\n        {\n            _options = options.Value;\n            _memoryCache = memoryCache;\n            //Create fileSystemWatcher instance only when rootFolder exist to prevent whole application crash on initialization phase. \n            if (Directory.Exists(_options.Path))\n            {\n                //It is very important to have rootPath with leading slash '\\' without this any changes won't reflected\n                var rootPath = _options.Path.TrimEnd(Path.DirectorySeparatorChar) + Path.DirectorySeparatorChar;\n                _physicalFileProvider = new PhysicalFileProvider(rootPath);\n            }\n        }\n        #region IContentBlobProvider Members\n        /// <summary>\n        /// Open blob for read \n        /// </summary>\n        /// <param name=\"path\">blob relative path /folder/blob.md</param>\n        /// <returns></returns>\n        public virtual Stream OpenRead(string path)\n        {\n            path = NormalizePath(path);\n            // traversing above root not permitted.\n            if (PathUtils.PathNavigatesAboveRoot(path))\n            {\n                throw new InvalidOperationException(path);\n            }\n            return File.OpenRead(path);\n        }\n\n        /// <summary>\n        /// Open blob for write by path\n        /// </summary>\n        /// <param name=\"path\"></param>\n        /// <returns>blob stream</returns>\n        public virtual Stream OpenWrite(string path)\n        {\n            path = NormalizePath(path);\n            // traversing above root not permitted.\n            if (PathUtils.PathNavigatesAboveRoot(path))\n            {\n                throw new InvalidOperationException(path);\n            }\n\n            var folderPath = Path.GetDirectoryName(path);\n\n            if (!Directory.Exists(folderPath))\n            {\n                Directory.CreateDirectory(folderPath);\n            }\n            return File.Open(path, FileMode.Create);\n        }\n\n        /// <summary>\n        /// Check that blob or folder with passed path exist\n        /// </summary>\n        /// <param name=\"path\">relative path /folder/blob.md</param>\n        /// <returns></returns>\n        public virtual bool PathExists(string path)\n        {\n            var cacheKey = CacheKey.With(GetType(), \"PathExists\", path);\n            return _memoryCache.GetOrCreateExclusive(cacheKey, (cacheEntry) =>\n            {\n                path = NormalizePath(path);\n                cacheEntry.AddExpirationToken(Watch(path));\n                cacheEntry.AddExpirationToken(ContentBlobCacheRegion.CreateChangeToken());\n                var retVal = Directory.Exists(path);\n                if (!retVal)\n                {\n                    retVal = File.Exists(path);\n                }\n                return retVal;\n            });\n        }\n\n        /// <summary>\n        /// Search blob content in specified folder\n        /// </summary>\n        /// <param name=\"path\">relative folder path in which the search  Example: /folder</param>\n        /// <param name=\"searchPattern\">search blob name pattern can be used mask (*, ? symbols)</param>\n        /// <param name=\"recursive\"> recursive search</param>\n        /// <returns>Returns relative path for all found blobs  example: /folder/blob.md </returns>\n        public virtual IEnumerable<string> Search(string path, string searchPattern, bool recursive)\n        {\n            var retVal = new List<string>();\n            path = NormalizePath(path);\n            searchPattern = searchPattern.TrimStart(Path.PathSeparator);\n            if (Directory.Exists(Path.GetDirectoryName(Path.Combine(path, searchPattern))))\n            {\n                var files = Directory.GetFiles(path, searchPattern, recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly)\n                                     .Select(x => GetRelativePath(x));\n                retVal.AddRange(files);\n            }\n            return retVal;\n        }\n\n        public virtual IChangeToken Watch(string path)\n        {\n            if (_physicalFileProvider == null)\n            {\n                return NullChangeToken.Singleton;\n            }\n\n            return _physicalFileProvider.Watch(path);\n        }\n        #endregion\n\n        protected virtual string GetRelativePath(string path)\n        {\n            return path.Replace(_options.Path, string.Empty).Replace(Path.DirectorySeparatorChar, '/');\n        }\n\n        protected virtual string NormalizePath(string path)\n        {\n            if (string.IsNullOrEmpty(path))\n            {\n                throw new ArgumentNullException(\"path\");\n            }\n            path = path.Replace('/', Path.DirectorySeparatorChar);\n            path = path.Replace(_options.Path, string.Empty);\n            return Path.Combine(_options.Path, path.TrimStart(Path.DirectorySeparatorChar));\n        }\n\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Countries/CountriesWorkContextBuilderExtensions.cs",
    "content": "using System.Collections.Generic;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.DependencyInjection;\nusing VirtoCommerce.Storefront.Model;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public static class CountriesWorkContextBuilderExtensions\n    {\n        public static Task WithCountriesAsync(this IWorkContextBuilder builder, IList<Country> countries)\n        {\n            builder.WorkContext.AllCountries = countries;\n            return Task.CompletedTask;\n        }\n\n        public static async Task WithCountriesAsync(this IWorkContextBuilder builder)\n        {\n            var serviceProvider = builder.HttpContext.RequestServices;\n            var countryService = serviceProvider.GetRequiredService<ICountriesService>();\n            var countries = await countryService.GetCountriesAsync();\n            await builder.WithCountriesAsync(countries);\n        }\n\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Countries/FileSystemCountriesOptions.cs",
    "content": "namespace VirtoCommerce.Storefront.Domain\n{\n    public class FileSystemCountriesOptions\n    {\n        public string FilePath { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Countries/FileSystemCountriesService.cs",
    "content": "using System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.Caching.Memory;\nusing Microsoft.Extensions.Options;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\nusing VirtoCommerce.Storefront.Model.Common.Exceptions;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class FileSystemCountriesService : ICountriesService\n    {\n        private readonly FileSystemCountriesOptions _options;\n        private readonly IStorefrontMemoryCache _memoryCache;\n        public FileSystemCountriesService(IStorefrontMemoryCache cacheManager, IOptions<FileSystemCountriesOptions> options)\n        {\n            _options = options.Value;\n            _memoryCache = cacheManager;\n        }\n        #region IKnowCountriesProvider members\n        public async Task<IList<Country>> GetCountriesAsync()\n        {\n            if (_options == null)\n            {\n                throw new StorefrontException(\"the path to countries json file not set\");\n            }\n\n            var cacheKey = CacheKey.With(GetType(), \"GetCountries\");\n            return await _memoryCache.GetOrCreateAsync(cacheKey, async (cacheEntry) =>\n            {\n                var result = new List<Country>();\n\n                if (_options != null)\n                {\n                    var countriesJson = await File.ReadAllTextAsync(_options.FilePath);\n                    var countriesDict = JsonConvert.DeserializeObject<Dictionary<string, JObject>>(countriesJson);\n\n                    result = countriesDict\n                        .Select(ParseCountry)\n                        .Where(c => !string.IsNullOrEmpty(c.Code3))\n                        .ToList();\n                }\n                return result;\n            });\n        }\n        #endregion\n\n        protected static Country ParseCountry(KeyValuePair<string, JObject> pair)\n        {\n            var country = new Country\n            {\n                Name = pair.Key,\n                Code2 = pair.Value[\"Code2\"]?.ToString(),\n                Code3 = pair.Value[\"Code3\"]?.ToString(),\n                RegionType = pair.Value[\"label\"]?.ToString()\n            };\n\n            var provinceCodes = pair.Value[\"province_codes\"].ToObject<Dictionary<string, string>>();\n            if (provinceCodes != null && provinceCodes.Any())\n            {\n                country.Regions = provinceCodes\n                    .Select(kvp => new CountryRegion { Name = kvp.Key, Code = kvp.Value })\n                    .ToArray();\n            }\n\n            return country;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/CurrencyService.cs",
    "content": "using System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.Caching.Memory;\nusing VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class CurrencyService : ICurrencyService\n    {\n        private readonly ICommerce _commerceApi;\n        private readonly IStorefrontMemoryCache _memoryCache;\n        private readonly IApiChangesWatcher _apiChangesWatcher;\n\n        public CurrencyService(ICommerce commerceApi, IStorefrontMemoryCache memoryCache, IApiChangesWatcher apiChangesWatcher)\n        {\n            _commerceApi = commerceApi;\n            _memoryCache = memoryCache;\n            _apiChangesWatcher = apiChangesWatcher;\n        }\n\n        public async Task<Currency[]> GetAllCurrenciesAsync(Language language)\n        {\n            var cacheKey = CacheKey.With(GetType(), language.CultureName);\n            return await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n            {\n                cacheEntry.AddExpirationToken(_apiChangesWatcher.CreateChangeToken());\n\n                return (await _commerceApi.GetAllCurrenciesAsync()).Select(x => x.ToCurrency(language)).ToArray();\n            });\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Customer/CutomerCacheRegion.cs",
    "content": "using System;\nusing Microsoft.Extensions.Primitives;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class CustomerCacheRegion : CancellableCacheRegion<CustomerCacheRegion>\n    {\n        public static IChangeToken CreateChangeToken(string memberId)\n        {\n            if (memberId == null)\n            {\n                throw new ArgumentNullException(nameof(memberId));\n            }\n\n            return CreateChangeTokenForKey(memberId);\n        }\n\n        public static void ExpireMember(string memberId)\n        {\n            if (!string.IsNullOrEmpty(memberId))\n            {\n                ExpireTokenForKey(memberId);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Customer/Handlers/SecurityEventsHandler.cs",
    "content": "using System.Threading.Tasks;\nusing VirtoCommerce.Storefront.Model.Common.Events;\nusing VirtoCommerce.Storefront.Model.Customer.Services;\nusing VirtoCommerce.Storefront.Model.Security.Events;\n\nnamespace VirtoCommerce.Storefront.Domain.Customer.Handlers\n{\n    public class SecurityEventsHandler : IEventHandler<UserDeletedEvent>\n    {\n        private readonly IMemberService _memberService;\n        public SecurityEventsHandler(IMemberService memberService)\n        {\n            _memberService = memberService;\n        }\n\n        #region IEventHandler<UserRegisteredEvent> members\n\n        public async Task Handle(UserDeletedEvent message)\n        {\n            if (message.User.ContactId != null)\n            {\n                await _memberService.DeleteContactAsync(message.User.ContactId);\n            }\n        }\n        #endregion\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Customer/MemberConverter.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing VirtoCommerce.Storefront.Common;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Customer;\nusing VirtoCommerce.Storefront.Model.Security;\nusing coreDto = VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi.Models;\nusing customerDto = VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models;\nusing platformDto = VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n\n    public static partial class MemberConverter\n    {\n        public static DynamicProperty ToDynamicProperty(this customerDto.DynamicObjectProperty propertyDto)\n        {\n            return propertyDto.JsonConvert<platformDto.DynamicObjectProperty>().ToDynamicProperty();\n        }\n\n\n        public static customerDto.DynamicObjectProperty ToCustomerDynamicPropertyDto(this DynamicProperty property)\n        {\n            return property.ToDynamicPropertyDto().JsonConvert<customerDto.DynamicObjectProperty>();\n        }\n\n        public static Address ToAddress(this customerDto.CustomerAddress addressDto)\n        {\n            return addressDto.JsonConvert<coreDto.Address>().ToAddress();\n        }\n\n        public static customerDto.CustomerAddress ToCustomerAddressDto(this Address address)\n        {\n            return address.ToCoreAddressDto().JsonConvert<customerDto.CustomerAddress>();\n        }\n\n        public static Contact ToContact(this UserRegistration userRegistration)\n        {\n            var result = new Contact\n            {\n                Name = userRegistration.Name ?? userRegistration.UserName,\n                FullName = string.IsNullOrWhiteSpace(userRegistration.FullName) ? string.Join(\" \", userRegistration.FirstName, userRegistration.LastName) : userRegistration.FullName,\n                FirstName = userRegistration.FirstName,\n                LastName = userRegistration.LastName,\n                Salutation = userRegistration.Salutation,\n                PhotoUrl = userRegistration.PhotoUrl\n            };\n            if (!string.IsNullOrEmpty(userRegistration.Email))\n            {\n                result.Emails.Add(userRegistration.Email);\n            }\n            if (string.IsNullOrEmpty(result.FullName) || string.IsNullOrWhiteSpace(result.FullName))\n            {\n                result.FullName = userRegistration.Email;\n            }\n            if (userRegistration.Address != null)\n            {\n                result.Addresses = new[] { userRegistration.Address };\n            }\n            return result;\n        }\n\n        public static Contact ToContact(this customerDto.Contact contactDto)\n        {\n            var result = new Contact\n            {\n                Id = contactDto.Id,\n                Name = contactDto.Name,\n                MemberType = contactDto.MemberType,\n                UserGroups = contactDto.Groups,\n                FullName = contactDto.FullName,\n                FirstName = contactDto.FirstName,\n                LastName = contactDto.LastName,\n                Emails = contactDto.Emails,\n                TimeZone = contactDto.TimeZone,\n                DefaultLanguage = contactDto.DefaultLanguage,\n                OrganizationId = contactDto.Organizations?.FirstOrDefault(),\n                OrganizationsIds = contactDto.Organizations,\n                Salutation = contactDto.Salutation,\n                Status = contactDto.Status,\n                PhotoUrl = contactDto.PhotoUrl\n            };\n\n            if (contactDto.Addresses != null)\n            {\n                result.Addresses = contactDto.Addresses.Select(ToAddress).ToList();\n            }\n\n            result.DefaultBillingAddress = result.Addresses\n                .Where(a => contactDto.DefaultBillingAddressId != null ? a.Id == contactDto.DefaultBillingAddressId : (a.Type & AddressType.Billing) == AddressType.Billing)\n                // Stabilize order\n                .OrderBy(a => a.Id)\n                .FirstOrDefault();\n            result.DefaultShippingAddress = result.Addresses\n                .Where(a => contactDto.DefaultShippingAddressId != null ? a.Id == contactDto.DefaultShippingAddressId : (a.Type & AddressType.Shipping) == AddressType.Shipping)\n                // Stabilize order\n                .OrderBy(a => a.Id)\n                .FirstOrDefault();\n\n            if (contactDto.Emails != null)\n            {\n                result.Emails = contactDto.Emails;\n            }\n            if (!contactDto.DynamicProperties.IsNullOrEmpty())\n            {\n                result.DynamicProperties = new MutablePagedList<DynamicProperty>(contactDto.DynamicProperties.Select(ToDynamicProperty).ToList());\n            }\n            if (!contactDto.SecurityAccounts.IsNullOrEmpty())\n            {\n                result.SecurityAccounts = contactDto.SecurityAccounts.Select(x => new SecurityAccount\n                {\n                    Id = x.Id,\n                    Roles = x.Roles?.Select(role => role.Name).ToList(),\n                    IsLockedOut = (x.LockoutEndDateUtc ?? DateTime.MinValue) > DateTime.UtcNow,\n                    UserName = x.UserName,\n                });\n            }\n            return result;\n        }\n\n        public static Organization ToOrganization(this OrganizationRegistration orgRegistration)\n        {\n            var organization = new Organization\n            {\n                Name = orgRegistration.OrganizationName,\n            };\n            if (organization.Addresses != null)\n            {\n                organization.Addresses.Add(orgRegistration.Address);\n            }\n            return organization;\n        }\n\n        public static Organization ToOrganization(this customerDto.Organization organizaionDto)\n        {\n            var result = new Organization\n            {\n                Id = organizaionDto.Id,\n                Name = organizaionDto.Name,\n                MemberType = organizaionDto.MemberType,\n                UserGroups = organizaionDto.Groups,\n            };\n\n            if (organizaionDto.Addresses != null)\n            {\n                result.Addresses = organizaionDto.Addresses.Select(ToAddress).ToList();\n            }\n\n            if (organizaionDto.Phones != null)\n            {\n                result.Phones = organizaionDto.Phones;\n            }\n\n            if (organizaionDto.Emails != null)\n            {\n                result.Emails = organizaionDto.Emails;\n            }\n\n            if (!organizaionDto.DynamicProperties.IsNullOrEmpty())\n            {\n                result.DynamicProperties = new MutablePagedList<DynamicProperty>(organizaionDto.DynamicProperties.Select(ToDynamicProperty).ToList());\n            }\n\n            return result;\n        }\n\n\n        public static customerDto.Contact ToContactDto(this Contact customer)\n        {\n            var retVal = new customerDto.Contact\n            {\n                Id = customer.Id,\n                Name = customer.Name,\n                FirstName = customer.FirstName,\n                FullName = customer.FullName,\n                LastName = customer.LastName,\n                MiddleName = customer.MiddleName,\n                Salutation = customer.Salutation,\n                Status = customer.Status,\n                PhotoUrl = customer.PhotoUrl,\n                MemberType = \"Contact\",\n            };\n            if (!customer.UserGroups.IsNullOrEmpty())\n            {\n                retVal.Groups = customer.UserGroups.ToArray();\n            }\n            if (!customer.Addresses.IsNullOrEmpty())\n            {\n                retVal.Addresses = new List<customerDto.CustomerAddress>();\n                foreach (var address in customer.Addresses)\n                {\n                    var addressDto = address.ToCustomerAddressDto();\n                    if (string.IsNullOrEmpty(addressDto.FirstName))\n                    {\n                        addressDto.FirstName = customer.FirstName;\n                    }\n                    if (string.IsNullOrEmpty(addressDto.LastName))\n                    {\n                        addressDto.LastName = customer.LastName;\n                    }\n                    if (string.IsNullOrEmpty(addressDto.Email))\n                    {\n                        addressDto.Email = customer.Email;\n                    }\n                    retVal.Addresses.Add(addressDto);\n                }\n            }\n\n            if (customer.DefaultShippingAddress != null)\n            {\n                retVal.DefaultShippingAddressId = customer.DefaultShippingAddress.Id;\n            }\n\n            if (customer.DefaultBillingAddress != null)\n            {\n                retVal.DefaultBillingAddressId = customer.DefaultBillingAddress.Id;\n            }\n\n            if (!customer.Emails.IsNullOrEmpty())\n            {\n                retVal.Emails = customer.Emails;\n            }\n\n            if (customer.OrganizationId != null)\n            {\n                retVal.Organizations = new List<string>() { customer.OrganizationId };\n            }\n            if (customer.OrganizationsIds != null)\n            {\n                retVal.Organizations = customer.OrganizationsIds.Concat(retVal.Organizations ?? Array.Empty<string>()).Distinct().ToArray();\n            }\n\n            if (!customer.DynamicProperties.IsNullOrEmpty())\n            {\n                retVal.DynamicProperties = customer.DynamicProperties.Select(ToCustomerDynamicPropertyDto).ToList();\n            }\n\n            return retVal;\n        }\n\n        public static customerDto.Organization ToOrganizationDto(this Organization org)\n        {\n            var retVal = new customerDto.Organization\n            {\n                Id = org.Id,\n                Name = org.Name,\n                MemberType = \"Organization\"\n            };\n\n            if (!org.UserGroups.IsNullOrEmpty())\n            {\n                retVal.Groups = org.UserGroups.ToArray();\n            }\n\n            if (!org.Addresses.IsNullOrEmpty())\n            {\n                retVal.Addresses = org.Addresses.Select(ToCustomerAddressDto).ToList();\n            }\n\n            if (!org.Emails.IsNullOrEmpty())\n            {\n                retVal.Emails = org.Emails;\n            }\n\n            if (!org.Phones.IsNullOrEmpty())\n            {\n                retVal.Phones = org.Phones;\n            }\n\n            if (!org.DynamicProperties.IsNullOrEmpty())\n            {\n                retVal.DynamicProperties = org.DynamicProperties.Select(ToCustomerDynamicPropertyDto).ToList();\n            }\n\n            return retVal;\n        }\n\n        public static customerDto.Contact ToCoreContactDto(this Contact contact)\n        {\n            return contact.ToContactDto().JsonConvert<customerDto.Contact>();\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Customer/MemberService.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.Caching.Memory;\nusing PagedList.Core;\nusing VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\nusing VirtoCommerce.Storefront.Model.Customer;\nusing VirtoCommerce.Storefront.Model.Customer.Services;\nusing customerDto = VirtoCommerce.Storefront.AutoRestClients.CustomerModuleApi.Models;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class MemberService : IMemberService\n    {\n        private readonly ICustomerModule _customerApi;\n        private readonly IStorefrontMemoryCache _memoryCache;\n        private readonly IApiChangesWatcher _apiChangesWatcher;\n\n        public MemberService(ICustomerModule customerApi, IStorefrontMemoryCache memoryCache, IApiChangesWatcher changesWatcher)\n        {\n            _customerApi = customerApi;\n            _memoryCache = memoryCache;\n            _apiChangesWatcher = changesWatcher;\n        }\n\n        #region ICustomerService Members\n        public virtual Task<Contact> GetContactByIdAsync(string contactId)\n        {\n            if (contactId == null)\n            {\n                throw new ArgumentNullException(nameof(contactId));\n            }\n\n            return GetContactByIdInternalAsync(contactId);\n        }\n\n        protected virtual async Task<Contact> GetContactByIdInternalAsync(string contactId)\n        {\n            Contact result = null;\n            var cacheKey = CacheKey.With(GetType(), \"GetContactByIdAsync\", contactId);\n            var dto = await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n            {\n                var contactDto = await _customerApi.GetContactByIdAsync(contactId);\n                if (contactDto != null)\n                {\n                    cacheEntry.AddExpirationToken(CustomerCacheRegion.CreateChangeToken(contactDto.Id));\n                    cacheEntry.AddExpirationToken(_apiChangesWatcher.CreateChangeToken());\n                }\n                return contactDto;\n            });\n\n            if (dto == null)\n            {\n                return null;\n            }\n\n            result = dto.ToContact();\n            if (!dto.Organizations.IsNullOrEmpty())\n            {\n                //Load contact organization\n                result.Organization = await GetOrganizationByIdAsync(dto.Organizations.FirstOrDefault());\n            }\n\n            return result;\n        }\n\n\n        public virtual async Task<Contact> CreateContactAsync(Contact contact)\n        {\n            var contactDto = contact.ToContactDto();\n            var result = await _customerApi.CreateContactAsync(contactDto);\n            return result?.ToContact();\n        }\n\n\n        public virtual async Task DeleteContactAsync(string contactId)\n        {\n            await _customerApi.DeleteContactsAsync(new[] { contactId });\n            //Invalidate cache\n            CustomerCacheRegion.ExpireMember(contactId);\n        }\n\n\n        public virtual async Task UpdateContactAsync(Contact contact)\n        {\n            await _customerApi.UpdateContactAsync(contact.ToContactDto());\n            //Invalidate cache\n            CustomerCacheRegion.ExpireMember(contact.Id);\n        }\n\n        public virtual async Task UpdateContactAddressesAsync(string contactId, IList<Address> addresses)\n        {\n            var existContact = await GetContactByIdAsync(contactId);\n            if (existContact != null)\n            {\n                await _customerApi.UpdateAddessesAsync(addresses.Select(x => x.ToCustomerAddressDto()).ToList(), contactId);\n\n                //Invalidate cache\n                CustomerCacheRegion.ExpireMember(existContact.Id);\n            }\n        }\n\n\n        public async Task<Organization> GetOrganizationByIdAsync(string organizationId)\n        {\n            Organization result = null;\n            var cacheKey = CacheKey.With(GetType(), \"GetOrganizationByIdAsync\", organizationId);\n            var dto = await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n            {\n                var organizationDto = await _customerApi.GetOrganizationByIdAsync(organizationId);\n                if (organizationDto != null)\n                {\n                    cacheEntry.AddExpirationToken(CustomerCacheRegion.CreateChangeToken(organizationDto.Id));\n                    cacheEntry.AddExpirationToken(_apiChangesWatcher.CreateChangeToken());\n                }\n                return organizationDto;\n            });\n\n            if (dto != null)\n            {\n                result = dto.ToOrganization();\n\n                //Lazy load organization contacts\n                result.Contacts = new MutablePagedList<Contact>((pageNumber, pageSize, sortInfos, @params) =>\n                {\n                    var criteria = new OrganizationContactsSearchCriteria\n                    {\n                        OrganizationId = result.Id,\n                        PageNumber = pageNumber,\n                        PageSize = pageSize\n                    };\n                    if (!sortInfos.IsNullOrEmpty())\n                    {\n                        criteria.Sort = SortInfo.ToString(sortInfos);\n                    }\n                    if (@params != null)\n                    {\n                        criteria.CopyFrom(@params);\n                    }\n                    return SearchOrganizationContacts(criteria);\n\n                }, 1, 20);\n            }\n            return result;\n        }\n\n\n        public async Task<Organization> CreateOrganizationAsync(Organization organization)\n        {\n            var orgDto = organization.ToOrganizationDto();\n            var result = await _customerApi.CreateOrganizationAsync(orgDto);\n            return result?.ToOrganization();\n        }\n\n        public async Task UpdateOrganizationAsync(Organization organization)\n        {\n            var orgDto = organization.ToOrganizationDto();\n            await _customerApi.UpdateOrganizationAsync(orgDto);\n            CustomerCacheRegion.ExpireMember(organization.Id);\n        }\n\n        public IPagedList<Contact> SearchOrganizationContacts(OrganizationContactsSearchCriteria criteria)\n        {\n            return SearchOrganizationContactsAsync(criteria).GetAwaiter().GetResult();\n        }\n\n        public async Task<IPagedList<Contact>> SearchOrganizationContactsAsync(OrganizationContactsSearchCriteria criteria)\n        {\n            var criteriaDto = new customerDto.MembersSearchCriteria\n            {\n                MemberId = criteria.OrganizationId,\n                Skip = (criteria.PageNumber - 1) * criteria.PageSize,\n                Take = criteria.PageSize,\n                Sort = criteria.Sort,\n                SearchPhrase = criteria.SearchPhrase,\n                ObjectType = \"Member\"\n            };\n            var searchResult = await _customerApi.SearchContactsAsync(criteriaDto);\n            var contacts = searchResult.Results.Select(x => x.ToContact()).ToList();\n\n            return new StaticPagedList<Contact>(contacts, criteria.PageNumber, criteria.PageSize, searchResult.TotalCount ?? 0);\n        }\n        #endregion\n    }\n}\n\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/IWorkContextBuilder.cs",
    "content": "using Microsoft.AspNetCore.Http;\nusing VirtoCommerce.Storefront.Model;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public interface IWorkContextBuilder\n    {\n        HttpContext HttpContext { get; }\n        WorkContext WorkContext { get; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/AnonymousUserForStoreAuthorizationRequirement.cs",
    "content": "using System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authorization;\nusing VirtoCommerce.Storefront.Model;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    public class AnonymousUserForStoreAuthorizationRequirement : IAuthorizationRequirement\n    {\n        public const string PolicyName = \"DenyAnonymousForStore\";\n    }\n\n    public class AnonymousUserForStoreAuthorizationHandler : AuthorizationHandler<AnonymousUserForStoreAuthorizationRequirement>\n    {\n        private readonly IWorkContextAccessor _workContextAccessor;\n\n        public AnonymousUserForStoreAuthorizationHandler(IWorkContextAccessor workContextAccessor)\n        {\n            _workContextAccessor = workContextAccessor;\n        }\n\n        protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, AnonymousUserForStoreAuthorizationRequirement requirement)\n        {\n            var workContext = _workContextAccessor.WorkContext;\n\n            if (workContext.CurrentUser.IsRegisteredUser || workContext.CurrentStore.AnonymousUsersAllowed)\n            {\n                context.Succeed(requirement);\n            }\n\n            return Task.CompletedTask;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/CanEditOrganizationResourceAuthorizationHandler.cs",
    "content": "using System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authorization;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Customer;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    public class CanEditOrganizationResourceAuthorizeRequirement : IAuthorizationRequirement\n    {\n        public const string PolicyName = \"CanEditOrganizationResource\";\n    }\n\n    public class CanEditOrganizationResourceAuthorizationHandler : AuthorizationHandler<CanEditOrganizationResourceAuthorizeRequirement, Organization>\n    {\n        private readonly IWorkContextAccessor _workContextAccessor;\n        public CanEditOrganizationResourceAuthorizationHandler(IWorkContextAccessor workContextAccessor)\n        {\n            _workContextAccessor = workContextAccessor;\n        }\n\n        protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, CanEditOrganizationResourceAuthorizeRequirement requirement, Organization resource)\n        {\n\n            var workContext = _workContextAccessor.WorkContext;\n            //Allow to do all things with self \n\n            var currentUserOrgIds = workContext.CurrentUser?.Contact?.OrganizationsIds;\n            var result = currentUserOrgIds != null && resource != null && currentUserOrgIds.Contains(resource.Id);\n\n            if (result)\n            {\n                context.Succeed(requirement);\n            }\n\n            return Task.CompletedTask;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/CanImpersonateAuthorizationHandler.cs",
    "content": "using System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authorization;\nusing VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi;\nusing VirtoCommerce.Storefront.Model;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    public class CanImpersonateAuthorizationRequirement : IAuthorizationRequirement\n    {\n        public const string PolicyName = \"CanImpersonate\";\n    }\n    public class CanImpersonateAuthorizationHandler : AuthorizationHandler<CanImpersonateAuthorizationRequirement>\n    {\n        private readonly IStoreModule _storeApi;\n        private readonly IWorkContextAccessor _workContextAccessor;\n        public CanImpersonateAuthorizationHandler(IStoreModule storeApi, IWorkContextAccessor workContextAccessor)\n        {\n            _storeApi = storeApi;\n            _workContextAccessor = workContextAccessor;\n        }\n\n        protected override async Task HandleRequirementAsync(AuthorizationHandlerContext context, CanImpersonateAuthorizationRequirement requirement)\n        {\n            var workContext = _workContextAccessor.WorkContext;\n            // Validate the requirement against the resource and identity.\n\n            var info = await _storeApi.GetLoginOnBehalfInfoAsync(workContext.CurrentStore.Id, workContext.CurrentUser.Id);\n            if (info.CanLoginOnBehalf == true)\n            {\n                context.Succeed(requirement);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/CanReadContentItemAuthorizationHandler.cs",
    "content": "using System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authorization;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.StaticContent;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    public class CanReadContentItemAuthorizeRequirement : IAuthorizationRequirement\n    {\n        public const string PolicyName = \"CanReadContentItem\";\n    }\n\n    public class CanReadContentItemAuthorizationHandler : AuthorizationHandler<CanReadContentItemAuthorizeRequirement, ContentItem>\n    {\n        private readonly IWorkContextAccessor _workContextAccessor;\n        public CanReadContentItemAuthorizationHandler(IWorkContextAccessor workContextAccessor)\n        {\n            _workContextAccessor = workContextAccessor;\n        }\n\n        protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, CanReadContentItemAuthorizeRequirement requirement, ContentItem resource)\n        {\n            var workContext = _workContextAccessor.WorkContext;\n            if (resource.Authorize)\n            {\n                if (workContext.CurrentUser.IsRegisteredUser)\n                {\n                    context.Succeed(requirement);\n                }\n            }\n            else\n            {\n                context.Succeed(requirement);\n            }\n\n            return Task.CompletedTask;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/CustomCookieAuthenticationEvents.cs",
    "content": "using System.Net;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authentication;\nusing Microsoft.AspNetCore.Authentication.Cookies;\nusing VirtoCommerce.Storefront.Extensions;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    public class CustomCookieAuthenticationEvents : CookieAuthenticationEvents\n    {\n        private readonly IStorefrontUrlBuilder _storefrontUrlBuilder;\n\n        public CustomCookieAuthenticationEvents(IStorefrontUrlBuilder storefrontUrlBuilder)\n        {\n            _storefrontUrlBuilder = storefrontUrlBuilder;\n        }\n\n        public override Task RedirectToLogin(RedirectContext<CookieAuthenticationOptions> context)\n        {\n            if (context.Request.Path.IsApi())\n            {\n                context.Response.StatusCode = (int)HttpStatusCode.Unauthorized;\n                return Task.CompletedTask;\n            }\n\n            var absolutePath = _storefrontUrlBuilder.ToStoreAbsolute(context.RedirectUri).ToAbsolutePath();\n            context.RedirectUri = WebUtility.UrlDecode(absolutePath);\n\n            return base.RedirectToLogin(context);\n        }\n\n        public override Task RedirectToAccessDenied(RedirectContext<CookieAuthenticationOptions> context)\n        {\n            if (context.Request.Path.IsApi())\n            {\n                context.Response.StatusCode = (int)HttpStatusCode.Forbidden;\n                return Task.CompletedTask;\n            }\n\n            var absolutePath = _storefrontUrlBuilder.ToStoreAbsolute(context.RedirectUri).ToAbsolutePath();\n            context.RedirectUri = WebUtility.UrlDecode(absolutePath);\n\n            return base.RedirectToAccessDenied(context);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/CustomSignInManager.cs",
    "content": "using System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authentication;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.AspNetCore.Identity;\nusing Microsoft.Extensions.Logging;\nusing Microsoft.Extensions.Options;\nusing VirtoCommerce.Storefront.Model.Security;\nusing VirtoCommerce.Storefront.Model.Security.Specifications;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    public class CustomSignInManager : SignInManager<User>\n    {\n        public CustomSignInManager(UserManager<User> userManager, IHttpContextAccessor contextAccessor, IUserClaimsPrincipalFactory<User> claimsFactory, IOptions<IdentityOptions> optionsAccessor,\n            ILogger<SignInManager<User>> logger, IAuthenticationSchemeProvider schemes, IUserConfirmation<User> userConfirmation)\n            : base(userManager, contextAccessor, claimsFactory, optionsAccessor, logger, schemes, userConfirmation)\n        {\n        }\n        protected override async Task<SignInResult> PreSignInCheck(User user)\n        {\n            return await base.PreSignInCheck(user) ?? (new IsUserSuspendedSpecification().IsSatisfiedBy(user) ? CustomSignInResult.Rejected : null);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/CustomUserManager.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Security.Claims;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Identity;\nusing Microsoft.Extensions.Logging;\nusing Microsoft.Extensions.Options;\nusing VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi;\nusing VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models;\nusing VirtoCommerce.Storefront.Model.Security;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    public class CustomUserManager : AspNetUserManager<User>\n    {\n        private readonly ISecurity _platformSecurityApi;\n\n        public CustomUserManager(IUserStore<User> userStore, IOptions<IdentityOptions> optionsAccessor, IPasswordHasher<User> passwordHasher,\n                                IEnumerable<IUserValidator<User>> userValidators, IEnumerable<IPasswordValidator<User>> passwordValidators,\n                                ILookupNormalizer keyNormalizer, IdentityErrorDescriber errors, IServiceProvider services, ILogger<UserManager<User>> logger,\n                                ISecurity platformSecurityApi)\n            : base(userStore, optionsAccessor, passwordHasher, userValidators, passwordValidators, keyNormalizer, errors, services, logger)\n        {\n            _platformSecurityApi = platformSecurityApi;\n        }\n\n        public async override Task<User> GetUserAsync(ClaimsPrincipal principal)\n        {\n            //User can be anonymous and also should be signed-in \n            var user = new User\n            {\n                Id = principal.FindFirstValue(ClaimTypes.NameIdentifier),\n                UserName = principal.FindFirstValue(ClaimTypes.Name),\n                SecurityStamp = principal.FindFirstValue(\"AspNet.Identity.SecurityStamp\")\n            };\n            //For registered users need to load it  from storage\n            if (principal.Identity.IsAuthenticated && user.UserName != SecurityConstants.AnonymousUsername)\n            {\n                user = await FindByIdAsync(user.Id);\n            }\n            //Restore some properties from cookies\n            if (user != null)\n            {\n                user.OperatorUserId = principal.FindFirstValue(SecurityConstants.Claims.OperatorUserIdClaimType);\n                user.OperatorUserName = principal.FindFirstValue(SecurityConstants.Claims.OperatorUserNameClaimType);\n                user.SelectedCurrencyCode = principal.FindFirstValue(SecurityConstants.Claims.CurrencyClaimType);\n            }\n            return user;\n        }\n\n        public override async Task<Microsoft.AspNetCore.Identity.IdentityResult> ResetPasswordAsync(User user, string token, string newPassword)\n        {\n            var result = await _platformSecurityApi.ResetPasswordByTokenAsync(user.Id,\n                new ResetPasswordConfirmRequest() { NewPassword = newPassword, Token = token });\n\n            return result.ToIdentityResult();\n        }\n\n        public override async Task<Microsoft.AspNetCore.Identity.IdentityResult> ConfirmEmailAsync(User user, string token)\n        {\n            var result = await _platformSecurityApi.ConfirmEmailAsync(user.Id, new ConfirmEmailRequest() { Token = token });\n\n            return result.ToIdentityResult();\n        }\n\n        public override async Task<string> GenerateChangeEmailTokenAsync(User user, string newEmail)\n        {\n            return await _platformSecurityApi.GenerateChangeEmailTokenAsync(user.Id, newEmail);\n        }\n\n        public override async Task<string> GenerateEmailConfirmationTokenAsync(User user)\n        {\n            return await _platformSecurityApi.GenerateEmailConfirmationTokenAsync(user.Id);\n        }\n\n        public override async Task<string> GeneratePasswordResetTokenAsync(User user)\n        {\n            return await _platformSecurityApi.GeneratePasswordResetTokenAsync(user.Id);\n        }\n\n        public override async Task<string> GenerateUserTokenAsync(User user, string tokenProvider, string purpose)\n        {\n            return await _platformSecurityApi.GenerateUserTokenAsync(user.Id, tokenProvider, purpose);\n        }\n\n        public override async Task<bool> VerifyUserTokenAsync(User user, string tokenProvider, string purpose, string token)\n        {\n            return await _platformSecurityApi.VerifyUserTokenAsync(user.Id,\n                new VerifyTokenRequest() { TokenProvider = tokenProvider, Purpose = purpose, Token = tokenProvider }) ?? false;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/Notifications/ChangePhoneNumberSmsNotification.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common.Notifications;\n\nnamespace VirtoCommerce.Storefront.Domain.Security.Notifications\n{\n    public class ChangePhoneNumberSmsNotification : SmsNotificationBase\n    {\n        public ChangePhoneNumberSmsNotification(string storeId, Language language)\n            : base(storeId, language)\n        {\n        }\n\n        public string Token { get; set; }\n\n        public override IEnumerable<KeyValuePair<string, string>> GetNotificationParameters()\n        {\n            foreach (var kvp in base.GetNotificationParameters())\n            {\n                yield return kvp;\n            }\n            yield return new KeyValuePair<string, string>(nameof(Token), Token);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/Notifications/EmailConfirmationNotification.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common.Notifications;\n\nnamespace VirtoCommerce.Storefront.Domain.Security.Notifications\n{\n    public class EmailConfirmationNotification : EmailNotificationBase\n    {\n        public EmailConfirmationNotification(string storeId, Language language)\n            : base(storeId, language)\n        {\n        }\n\n        public string Url { get; set; }\n\n        public override IEnumerable<KeyValuePair<string, string>> GetNotificationParameters()\n        {\n            var result = base.GetNotificationParameters().ToList();\n            result.Add(new KeyValuePair<string, string>(nameof(Url), Url));\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/Notifications/RegistrationEmailNotification.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common.Notifications;\n\nnamespace VirtoCommerce.Storefront.Domain.Security.Notifications\n{\n    public class RegistrationEmailNotification : EmailNotificationBase\n    {\n        public RegistrationEmailNotification(string storeId, Language language)\n            : base(storeId, language)\n        {\n        }\n        public string Login { get; set; }\n        public string FirstName { get; set; }\n        public string LastName { get; set; }\n\n        public override IEnumerable<KeyValuePair<string, string>> GetNotificationParameters()\n        {\n            var result = base.GetNotificationParameters().ToList();\n            result.Add(new KeyValuePair<string, string>(nameof(Login), Login));\n            result.Add(new KeyValuePair<string, string>(nameof(FirstName), FirstName));\n            result.Add(new KeyValuePair<string, string>(nameof(LastName), LastName));\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/Notifications/RegistrationInvitationNotification.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common.Notifications;\n\nnamespace VirtoCommerce.Storefront.Domain.Security.Notifications\n{\n    public class RegistrationInvitationNotification : EmailNotificationBase\n    {\n        public RegistrationInvitationNotification(string storeId, Language language)\n            : base(storeId, language)\n        {\n        }\n\n        public string InviteUrl { get; set; }\n\n        public override IEnumerable<KeyValuePair<string, string>> GetNotificationParameters()\n        {\n            var result = base.GetNotificationParameters().ToList();\n            result.Add(new KeyValuePair<string, string>(nameof(InviteUrl), InviteUrl));\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/Notifications/RemindUserNameNotification.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common.Notifications;\n\nnamespace VirtoCommerce.Storefront.Domain.Security.Notifications\n{\n    public class RemindUserNameNotification : EmailNotificationBase\n    {\n        public RemindUserNameNotification(string storeId, Language language)\n            : base(storeId, language)\n        {\n        }\n\n        public string UserName { get; set; }\n\n\n        public override IEnumerable<KeyValuePair<string, string>> GetNotificationParameters()\n        {\n            var result = base.GetNotificationParameters().ToList();\n            result.Add(new KeyValuePair<string, string>(nameof(UserName), UserName));\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/Notifications/ResetPasswordEmailNotification.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common.Notifications;\n\nnamespace VirtoCommerce.Storefront.Domain.Security.Notifications\n{\n    public class ResetPasswordEmailNotification : EmailNotificationBase\n    {\n        public ResetPasswordEmailNotification(string storeId, Language language)\n            : base(storeId, language)\n        {\n        }\n\n        public string Url { get; set; }\n\n        public override IEnumerable<KeyValuePair<string, string>> GetNotificationParameters()\n        {\n            var result = base.GetNotificationParameters().ToList();\n            result.Add(new KeyValuePair<string, string>(nameof(Url), Url));\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/Notifications/ResetPasswordSmsNotification.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common.Notifications;\n\nnamespace VirtoCommerce.Storefront.Domain.Security.Notifications\n{\n    public class ResetPasswordSmsNotification : SmsNotificationBase\n    {\n        public ResetPasswordSmsNotification(string storeId, Language language)\n            : base(storeId, language)\n        {\n        }\n\n        public string Token { get; set; }\n\n        public override IEnumerable<KeyValuePair<string, string>> GetNotificationParameters()\n        {\n            foreach (var kvp in base.GetNotificationParameters())\n            {\n                yield return kvp;\n            }\n\n            yield return new KeyValuePair<string, string>(nameof(Token), Token);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/Notifications/TwoFactorEmailNotification.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common.Notifications;\n\nnamespace VirtoCommerce.Storefront.Domain.Security.Notifications\n{\n    public class TwoFactorEmailNotification : EmailNotificationBase\n    {\n        public TwoFactorEmailNotification(string storeId, Language language)\n            : base(storeId, language)\n        {\n        }\n\n        public string Token { get; set; }\n\n        public override IEnumerable<KeyValuePair<string, string>> GetNotificationParameters()\n        {\n            foreach (var kvp in base.GetNotificationParameters())\n            {\n                yield return kvp;\n            }\n            yield return new KeyValuePair<string, string>(nameof(Token), Token);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/Notifications/TwoFactorSmsNotification.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common.Notifications;\n\nnamespace VirtoCommerce.Storefront.Domain.Security.Notifications\n{\n    public class TwoFactorSmsNotification : SmsNotificationBase\n    {\n        public TwoFactorSmsNotification(string storeId, Language language)\n            : base(storeId, language)\n        {\n        }\n\n        public string Token { get; set; }\n\n        public override IEnumerable<KeyValuePair<string, string>> GetNotificationParameters()\n        {\n            foreach (var kvp in base.GetNotificationParameters())\n            {\n                yield return kvp;\n            }\n            yield return new KeyValuePair<string, string>(nameof(Token), Token);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/OnlyRegisteredUserAuthorizationHandler.cs",
    "content": "using System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authorization;\nusing VirtoCommerce.Storefront.Model;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    public class OnlyRegisteredUserAuthorizationRequirement : IAuthorizationRequirement\n    {\n        public const string PolicyName = \"OnlyRegisteredUser\";\n    }\n    /// <summary>\n    /// We need this policy as alternative for [Authorize] attribute, because in the storefront all users are registered in terms of ASP.NET authorization.\n    /// </summary>\n    public class OnlyRegisteredUserAuthorizationHandler : AuthorizationHandler<OnlyRegisteredUserAuthorizationRequirement>\n    {\n        private readonly IWorkContextAccessor _workContextAccessor;\n        public OnlyRegisteredUserAuthorizationHandler(IWorkContextAccessor workContextAccessor)\n        {\n            _workContextAccessor = workContextAccessor;\n        }\n\n        protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, OnlyRegisteredUserAuthorizationRequirement requirement)\n        {\n            var workContext = _workContextAccessor.WorkContext;\n            if (workContext.CurrentUser.IsRegisteredUser)\n            {\n                context.Succeed(requirement);\n            }\n            return Task.CompletedTask;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/PermissionAuthorizationHandler.cs",
    "content": "using System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authorization;\nusing VirtoCommerce.Storefront.Model.Security;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    public class PermissionAuthorizationHandler : AuthorizationHandler<PermissionAuthorizationRequirement>\n    {\n        protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, PermissionAuthorizationRequirement requirement)\n        {\n            if (context.User.IsInRole(SecurityConstants.Roles.Administrator))\n            {\n                context.Succeed(requirement);\n            }\n            if (context.User.HasClaim(SecurityConstants.Claims.PermissionClaimType, requirement.Permission))\n            {\n                context.Succeed(requirement);\n            }\n            return Task.CompletedTask;\n        }\n\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/PermissionAuthorizationPolicyProvider.cs",
    "content": "using System.Collections.Generic;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authorization;\nusing Microsoft.Extensions.Caching.Memory;\nusing Microsoft.Extensions.Options;\nusing VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\nusing VirtoCommerce.Storefront.Model.Security;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    /// <summary>\n    /// https://www.jerriepelser.com/blog/creating-dynamic-authorization-policies-aspnet-core/\n    /// </summary>\n    public class PermissionAuthorizationPolicyProvider : DefaultAuthorizationPolicyProvider\n    {\n        private readonly IStorefrontMemoryCache _memoryCache;\n        private readonly ISecurity _platformSecurityApi;\n        public PermissionAuthorizationPolicyProvider(IOptions<AuthorizationOptions> options, ISecurity platformSecurityApi, IStorefrontMemoryCache memoryCache)\n            : base(options)\n        {\n            _memoryCache = memoryCache;\n            _platformSecurityApi = platformSecurityApi;\n        }\n\n        public override async Task<AuthorizationPolicy> GetPolicyAsync(string policyName)\n        {\n            // Check static policies first\n            var policy = await base.GetPolicyAsync(policyName);\n\n            if (policy == null)\n            {\n                var map = await GetDynamicAuthorizationPoliciesFromPlatformPermissions();\n                map.TryGetValue(policyName, out policy);\n            }\n\n            return policy;\n        }\n\n        private async Task<Dictionary<string, AuthorizationPolicy>> GetDynamicAuthorizationPoliciesFromPlatformPermissions()\n        {\n            var cacheKey = CacheKey.With(GetType(), \"GetDynamicAuthorizationPoliciesFromPlatformPermissions\");\n            var result = await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n            {\n                cacheEntry.AddExpirationToken(SecurityCacheRegion.CreateChangeToken());\n\n                var resultLookup = new Dictionary<string, AuthorizationPolicy>();\n                foreach (var permission in await _platformSecurityApi.GetAllRegisteredPermissionsAsync())\n                {\n                    resultLookup[permission.Id] = new AuthorizationPolicyBuilder().AddRequirements(new PermissionAuthorizationRequirement { Permission = permission.Id }).Build();\n                }\n\n                //Register storefront permissions\n                foreach (var permission in SecurityConstants.Permissions.AllPermissions)\n                {\n                    resultLookup[permission] = new AuthorizationPolicyBuilder().AddRequirements(new PermissionAuthorizationRequirement { Permission = permission }).Build();\n                }\n\n                return resultLookup;\n            });\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/PermissionAuthorizationRequirement.cs",
    "content": "using Microsoft.AspNetCore.Authorization;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    public class PermissionAuthorizationRequirement : IAuthorizationRequirement\n    {\n        public string Permission { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/PollingApiUserChangeToken.cs",
    "content": "using System;\nusing System.Linq;\nusing System.Threading;\nusing Microsoft.Extensions.Primitives;\nusing VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi;\nusing VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    public sealed class PollingApiUserChangeToken : IChangeToken\n    {\n        private readonly ISecurity _platformSecurityApi;\n        private static DateTime _previousChangeTimeUtcStatic = DateTime.UtcNow;\n        private static DateTime _lastCheckedTimeUtcStatic;\n        private readonly TimeSpan _pollingInterval;\n\n        private readonly object _lock = new object();\n\n        public PollingApiUserChangeToken(ISecurity platformSecurityApi, TimeSpan pollingInterval)\n        {\n            _pollingInterval = pollingInterval;\n            _platformSecurityApi = platformSecurityApi;\n        }\n\n        public static void UpdatePreviousChangeTimeUtcStatic(DateTime currentTime)\n        {\n            _previousChangeTimeUtcStatic = currentTime;\n        }\n\n        public static void UpdateLastCheckedTimeUtcStatic(DateTime currentTime)\n        {\n            _lastCheckedTimeUtcStatic = currentTime;\n        }\n\n\n        /// <summary>\n        /// Always false.\n        /// </summary>\n        public bool ActiveChangeCallbacks => false;\n\n        public bool HasChanged\n        {\n            get\n            {\n                var currentTime = DateTime.UtcNow;\n                if (currentTime - _lastCheckedTimeUtcStatic < _pollingInterval)\n                {\n                    return false;\n                }\n\n                var lockTaken = Monitor.TryEnter(_lock);\n                try\n                {\n                    //Do not wait if is locked by another thread \n                    if (lockTaken)\n                    {\n                        var result = _platformSecurityApi.SearchUsersAsync(new UserSearchCriteria()\n                        {\n                            Skip = 0,\n                            Take = int.MaxValue,\n                            ModifiedSinceDate = _previousChangeTimeUtcStatic\n                        });\n\n                        if (result.Result.TotalCount > 0)\n                        {\n                            UpdatePreviousChangeTimeUtcStatic(currentTime);\n\n                            foreach (var userId in result.Result.Users.Select(x => x.Id))\n                            {\n                                SecurityCacheRegion.ExpireUser(userId);\n                            }\n                        }\n\n                        UpdateLastCheckedTimeUtcStatic(currentTime);\n                    }\n                }\n                finally\n                {\n                    if (lockTaken)\n                    {\n                        Monitor.Exit(_lock);\n                    }\n                }\n                return false;\n            }\n        }\n\n        /// <summary>\n        /// Does not actually register callbacks.\n        /// </summary>\n        /// <param name=\"callback\">This parameter is ignored</param>\n        /// <param name=\"state\">This parameter is ignored</param>\n        /// <returns>A disposable object that noops when disposed</returns>\n        public IDisposable RegisterChangeCallback(Action<object> callback, object state) => EmptyDisposable.Instance;\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/SecurityCacheRegion.cs",
    "content": "using System;\nusing Microsoft.Extensions.Primitives;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    public class SecurityCacheRegion : CancellableCacheRegion<SecurityCacheRegion>\n    {\n        public static IChangeToken CreateChangeToken(string userId)\n        {\n            if (userId == null)\n            {\n                throw new ArgumentNullException(nameof(userId));\n            }\n\n            return CreateChangeTokenForKey(userId);\n        }\n\n        public static void ExpireUser(string userId)\n        {\n            if (!string.IsNullOrEmpty(userId))\n            {\n                ExpireTokenForKey(userId);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/SecurityConverter.cs",
    "content": "using System.Linq;\nusing Microsoft.AspNetCore.Identity;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Security;\nusing Dto = VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n\n    public static class SecurityConverter\n    {\n        public static IdentityResult ToIdentityResult(this Dto.SecurityResult resultDto)\n        {\n            if (resultDto.Succeeded == true)\n            {\n                return IdentityResult.Success;\n            }\n            return IdentityResult.Failed(resultDto.Errors.Select(x => new IdentityError { Description = x }).ToArray());\n        }\n\n        public static Dto.Role ToRoleDto(this Role role)\n        {\n            return new Dto.Role\n            {\n                Id = role.Id,\n                Name = role.Name,\n                Permissions = role.Permissions.Select(x => new Dto.Permission { Id = x, Name = x }).ToList()\n            };\n        }\n        public static Role ToRole(this Dto.Role roleDto)\n        {\n            return new Role\n            {\n                Id = roleDto.Id,\n                Name = roleDto.Name,\n                Permissions = roleDto.Permissions.Select(x => x.Id).ToList()\n            };\n        }\n\n        public static User ToUser(this OrganizationUserRegistration registerForm)\n        {\n            var result = ((UserRegistration)registerForm).ToUser();\n            if (!string.IsNullOrEmpty(registerForm.Role))\n            {\n                var role = SecurityConstants.Roles.AllRoles.FirstOrDefault(x => x.Id.EqualsInvariant(registerForm.Role));\n                if (role != null)\n                {\n                    result.Roles = new[] { role };\n                }\n                else\n                {\n                    result.Roles = new[] { new Role { Id = registerForm.Role, Name = registerForm.Role } };\n                }\n            }\n            return result;\n        }\n\n        public static User ToUser(this UserRegistration registerForm)\n        {\n            var result = new User\n            {\n                Email = registerForm.Email,\n                UserName = registerForm.UserName,\n                Password = registerForm.Password,\n                UserType = \"Customer\"\n            };\n            //Take userName as Email if it valid and Email is not set \n            if (string.IsNullOrEmpty(result.Email))\n            {\n                result.Email = registerForm.UserName.IsValidEmail() ? registerForm.UserName : result.Email;\n            }\n            return result;\n        }\n\n        public static User ToUser(this Dto.ApplicationUser userDto)\n        {\n            var result = new User()\n            {\n                Email = userDto.Email,\n                Id = userDto.Id,\n                ContactId = userDto.MemberId,\n                PhoneNumber = userDto.PhoneNumber,\n                UserName = userDto.UserName,\n                StoreId = userDto.StoreId,\n                IsRegisteredUser = true,\n                IsAdministrator = userDto.IsAdministrator ?? false,\n                Permissions = userDto.Permissions,\n                AccessFailedCount = userDto.AccessFailedCount ?? 0,\n                LockoutEnabled = userDto.LockoutEnabled ?? false,\n                EmailConfirmed = userDto.EmailConfirmed ?? false,\n                LockoutEndDateUtc = userDto.LockoutEndDateUtc,\n                LastLoginDate = userDto.LastLoginDate,\n                PasswordExpired = userDto.PasswordExpired ?? false,\n                PasswordHash = userDto.PasswordHash,\n                SecurityStamp = userDto.SecurityStamp,\n                UserState = EnumUtility.SafeParse(userDto.UserState, AccountState.Approved),\n                UserType = userDto.UserType,\n                TwoFactorEnabled = userDto.TwoFactorEnabled ?? false,\n                PhoneNumberConfirmed = userDto.PhoneNumberConfirmed ?? false,\n                Status = userDto.Status,\n            };\n\n            if (!userDto.Roles.IsNullOrEmpty())\n            {\n                result.Roles = userDto.Roles.Select(x => new Role\n                {\n                    Id = x.Id,\n                    Name = x.Name\n                });\n            }\n\n            if (!userDto.Logins.IsNullOrEmpty())\n            {\n                result.ExternalLogins = userDto.Logins.Select(x => new ExternalUserLoginInfo\n                {\n                    LoginProvider = x.LoginProvider,\n                    ProviderKey = x.ProviderKey\n                }).ToList();\n            }\n\n            return result;\n        }\n\n        public static Dto.ApplicationUser ToUserDto(this User user)\n        {\n            var result = new Dto.ApplicationUser\n            {\n                Id = user.Id,\n                Email = user.Email,\n                Password = user.Password,\n                UserName = user.UserName,\n                StoreId = user.StoreId,\n                MemberId = user.Contact?.Id ?? user.ContactId,\n                AccessFailedCount = user.AccessFailedCount,\n                EmailConfirmed = user.EmailConfirmed,\n                LockoutEnabled = user.LockoutEnabled,\n                LockoutEndDateUtc = user.LockoutEndDateUtc,\n                LastLoginDate = user.LastLoginDate,\n                TwoFactorEnabled = user.TwoFactorEnabled,\n                SecurityStamp = user.SecurityStamp,\n                PasswordHash = user.PasswordHash,\n                UserState = user.UserState.ToString(),\n                UserType = user.UserType,\n                IsAdministrator = user.IsAdministrator,\n                PhoneNumber = user.PhoneNumber,\n                PhoneNumberConfirmed = user.PhoneNumberConfirmed,\n                PasswordExpired = user.PasswordExpired,\n                Status = user.Status\n            };\n\n            if (!user.Roles.IsNullOrEmpty())\n            {\n                //Need to convert role names to the registered in the platform roles entities \n                result.Roles = user.Roles.Select(ToRoleDto).ToList();\n            }\n            if (!user.ExternalLogins.IsNullOrEmpty())\n            {\n                result.Logins = user.ExternalLogins.Select(x => new Dto.ApplicationUserLogin\n                {\n                    LoginProvider = x.LoginProvider,\n                    ProviderKey = x.ProviderKey\n                }).ToList();\n            }\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/SecurityWorkContextBuilderExtensions.cs",
    "content": "using System;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Identity;\nusing Microsoft.Extensions.DependencyInjection;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Security;\nusing VirtoCommerce.Storefront.Model.Security.Specifications;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    public static class SecurityWorkContextBuilderExtensions\n    {\n        public static async Task WithCurrentUserAsync(this IWorkContextBuilder builder)\n        {\n            var serviceProvider = builder.HttpContext.RequestServices;\n            var signInManager = serviceProvider.GetRequiredService<SignInManager<User>>();\n\n            // Gets the collection of external login providers\n            var externalAuthTypes = (await signInManager.GetExternalAuthenticationSchemesAsync()).ToList();\n            builder.WorkContext.ExternalLoginProviders = externalAuthTypes.Select(at => new LoginProvider\n            {\n                AuthenticationType = at.Name,\n                Caption = at.DisplayName,\n            }).ToList();\n\n            var user = await signInManager.UserManager.GetUserAsync(builder.HttpContext.User);\n\n            if (user != null && !new CanUserLoginToStoreSpecification(user).IsSatisfiedBy(builder.WorkContext.CurrentStore))\n            {\n                await signInManager.SignOutAsync();\n                user = null;\n            }\n\n            if (user != null && new IsUserSuspendedSpecification().IsSatisfiedBy(user))\n            {\n                await signInManager.SignOutAsync();\n                user = null;\n            }\n\n            //Login as a new anonymous user\n            if (user == null || user.IsTransient())\n            {\n                user = new User\n                {\n                    Id = Guid.NewGuid().ToString(),\n                    SecurityStamp = Guid.NewGuid().ToString(),\n                    UserName = SecurityConstants.AnonymousUsername,\n                };\n                //Workaround: Do not sign out for js map requests they are always coming without authentication\n                if (!builder.HttpContext.Request.Path.Value.EndsWith(\".map\"))\n                {\n                    //Sign-in anonymous user\n                    await signInManager.SignInAsync(user, isPersistent: true);\n                    //https://github.com/aspnet/Security/issues/1131\n                    //the sign in operation doesn't change the current request user principal.\n                    //That only happens on incoming requests once the cookie or bearer token (or whatever thing the type of auth requires to create an identity) is set.\n                    //Need to manually set User in the HttpContext to avoid issues such like Antiforegery token generation for undefined user for  the current request \n                    builder.HttpContext.User = await signInManager.ClaimsFactory.CreateAsync(user);\n                }\n            }\n            builder.WorkContext.CurrentUser = user;\n        }\n\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Security/UserStoreStub.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Security.Claims;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Identity;\nusing Microsoft.Extensions.Caching.Memory;\nusing Microsoft.Extensions.Options;\nusing VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\nusing VirtoCommerce.Storefront.Model.Customer.Services;\nusing VirtoCommerce.Storefront.Model.Security;\n\nnamespace VirtoCommerce.Storefront.Domain.Security\n{\n    //Stub for UserManager\n    public sealed class UserStoreStub :\n        IUserEmailStore<User>,\n        IUserPasswordStore<User>,\n        IUserLockoutStore<User>,\n        IUserLoginStore<User>,\n        IUserSecurityStampStore<User>,\n        IUserClaimStore<User>,\n        IRoleStore<Role>,\n        IUserPhoneNumberStore<User>,\n        IUserTwoFactorStore<User>,\n        IUserAuthenticatorKeyStore<User>\n    {\n        private readonly ISecurity _platformSecurityApi;\n        private readonly IStorefrontMemoryCache _memoryCache;\n        private readonly IMemberService _memberService;\n        private readonly StorefrontOptions _options;\n        private readonly IApiChangesWatcher _apiChangesWatcher;\n\n        public UserStoreStub(ISecurity platformSecurityApi,\n            IMemberService memberService,\n            IStorefrontMemoryCache memoryCache,\n            IOptions<StorefrontOptions> options,\n            IApiChangesWatcher apiChangesWatcher)\n        {\n            _platformSecurityApi = platformSecurityApi;\n            _memoryCache = memoryCache;\n            _memberService = memberService;\n            _options = options.Value;\n            _apiChangesWatcher = apiChangesWatcher;\n\n        }\n\n        #region IUserStore<User> members\n\n        public async Task<IdentityResult> CreateAsync(User user, CancellationToken cancellationToken)\n        {\n            var newContactCreated = false;\n            if (user.Contact != null)\n            {\n                user.Contact = await _memberService.CreateContactAsync(user.Contact);\n                newContactCreated = true;\n            }\n\n            var dtoUser = user.ToUserDto();\n            var resultDto = await _platformSecurityApi.CreateAsync(dtoUser);\n\n            if (resultDto.Succeeded != true && newContactCreated)\n            {\n                await _memberService.DeleteContactAsync(user.Contact.Id);\n            }\n\n            return resultDto.ToIdentityResult();\n        }\n\n        public async Task<IdentityResult> CreateAsync(Role role, CancellationToken cancellationToken)\n        {\n            return await SaveAsync(role, cancellationToken);\n        }\n\n        public async Task<IdentityResult> DeleteAsync(User user, CancellationToken cancellationToken)\n        {\n            await _platformSecurityApi.DeleteAsync(new[] { user.UserName });\n            //Evict user from the cache\n            SecurityCacheRegion.ExpireUser(user.Id);\n            return IdentityResult.Success;\n        }\n\n        public Task<IdentityResult> DeleteAsync(Role role, CancellationToken cancellationToken)\n        {\n            throw new NotImplementedException();\n        }\n\n        public async Task<IdentityResult> UpdateAsync(Role role, CancellationToken cancellationToken)\n        {\n            return await SaveAsync(role, cancellationToken);\n        }\n\n        public async Task<User> FindByIdAsync(string userId, CancellationToken cancellationToken)\n        {\n            var cacheKey = CacheKey.With(GetType(), \"FindByIdAsync\", userId);\n            var result = await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n            {\n                var userDto = await _platformSecurityApi.GetUserByIdAsync(userId);\n\n                return await PrepareUserResultAsync(cacheEntry, userDto);\n            }, cacheNullValue: false);\n\n            //Load user associated contact\n            if (result != null && result.ContactId != null)\n            {\n                result.Contact = await _memberService.GetContactByIdAsync(result.ContactId);\n            }\n\n            return result;\n        }\n\n        public async Task<User> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken)\n        {\n            var cacheKey = CacheKey.With(GetType(), \"FindByNameAsync\", normalizedUserName);\n            var result = await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n            {\n                var userDto = await _platformSecurityApi.GetUserByNameAsync(normalizedUserName);\n\n                return await PrepareUserResultAsync(cacheEntry, userDto);\n            }, cacheNullValue: false);\n\n            //Load user associated contact\n            if (result != null && result.ContactId != null)\n            {\n                result.Contact = await _memberService.GetContactByIdAsync(result.ContactId);\n            }\n\n            return result;\n        }\n\n        public Task<string> GetNormalizedUserNameAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.UserName);\n        }\n\n        public Task<string> GetUserIdAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.Id);\n        }\n\n        public Task<string> GetUserNameAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.UserName);\n        }\n\n        public Task SetNormalizedUserNameAsync(User user, string normalizedName, CancellationToken cancellationToken)\n        {\n            user.NormalizedUserName = normalizedName;\n            return Task.CompletedTask;\n        }\n\n        public Task SetUserNameAsync(User user, string userName, CancellationToken cancellationToken)\n        {\n            user.UserName = userName;\n            return Task.CompletedTask;\n        }\n\n        public async Task<IdentityResult> UpdateAsync(User user, CancellationToken cancellationToken)\n        {\n            if (user.Contact != null)\n            {\n                if (user.Contact.IsTransient())\n                {\n                    user.Contact = await _memberService.CreateContactAsync(user.Contact);\n                }\n                else\n                {\n                    await _memberService.UpdateContactAsync(user.Contact);\n                }\n            }\n\n            var dtoUser = user.ToUserDto();\n            var resultDto = await _platformSecurityApi.UpdateAsync(dtoUser);\n\n            //Evict user from the cache\n            SecurityCacheRegion.ExpireUser(user.Id);\n            return resultDto.ToIdentityResult();\n        }\n\n        #endregion\n\n        #region IUserLockoutStore<User> members\n\n        public Task<int> GetAccessFailedCountAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.AccessFailedCount);\n        }\n\n        public Task<bool> GetLockoutEnabledAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.LockoutEnabled);\n        }\n\n        public Task<DateTimeOffset?> GetLockoutEndDateAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult((DateTimeOffset?)user.LockoutEndDateUtc);\n        }\n\n        public Task<int> IncrementAccessFailedCountAsync(User user, CancellationToken cancellationToken)\n        {\n            user.AccessFailedCount++;\n            return Task.FromResult(user.AccessFailedCount);\n        }\n\n        public Task ResetAccessFailedCountAsync(User user, CancellationToken cancellationToken)\n        {\n            user.AccessFailedCount = 0;\n            return Task.CompletedTask;\n        }\n\n        public Task SetLockoutEnabledAsync(User user, bool enabled, CancellationToken cancellationToken)\n        {\n            user.LockoutEnabled = enabled;\n            return Task.CompletedTask;\n        }\n\n        public Task SetLockoutEndDateAsync(User user, DateTimeOffset? lockoutEnd, CancellationToken cancellationToken)\n        {\n            user.LockoutEndDateUtc = lockoutEnd?.UtcDateTime;\n            return Task.CompletedTask;\n        }\n\n        #endregion\n\n        #region IUserEmailStore<User> members\n\n        public async Task<User> FindByEmailAsync(string normalizedEmail, CancellationToken cancellationToken)\n        {\n            var cacheKey = CacheKey.With(GetType(), \"FindByEmailAsync\", normalizedEmail);\n            var result = await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n            {\n                var userDto = await _platformSecurityApi.GetUserByEmailAsync(normalizedEmail);\n\n                return await PrepareUserResultAsync(cacheEntry, userDto);\n            }, cacheNullValue: false);\n\n            //Load user associated contact\n            if (result != null && result.ContactId != null)\n            {\n                result.Contact = await _memberService.GetContactByIdAsync(result.ContactId);\n            }\n\n            return result;\n        }\n\n        public Task<string> GetEmailAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.Email);\n        }\n\n        public Task<bool> GetEmailConfirmedAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.EmailConfirmed);\n        }\n\n        public Task<string> GetNormalizedEmailAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.NormalizedEmail);\n        }\n\n        public Task SetEmailAsync(User user, string email, CancellationToken cancellationToken)\n        {\n            user.Email = email;\n            return Task.CompletedTask;\n        }\n\n        public Task SetEmailConfirmedAsync(User user, bool confirmed, CancellationToken cancellationToken)\n        {\n            user.EmailConfirmed = confirmed;\n            return Task.CompletedTask;\n        }\n\n        public Task SetNormalizedEmailAsync(User user, string normalizedEmail, CancellationToken cancellationToken)\n        {\n            user.NormalizedEmail = normalizedEmail;\n            return Task.CompletedTask;\n        }\n\n        #endregion\n\n        #region IUserLoginStore<User> members\n\n        public Task AddLoginAsync(User user, UserLoginInfo login, CancellationToken cancellationToken)\n        {\n            user.ExternalLogins.Add(new ExternalUserLoginInfo\n            {\n                LoginProvider = login.LoginProvider,\n                ProviderKey = login.ProviderKey,\n                ProviderDisplayName = login.ProviderDisplayName\n            });\n            return Task.CompletedTask;\n        }\n\n        public async Task<User> FindByLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken)\n        {\n            var cacheKey = CacheKey.With(GetType(), \"FindByLoginAsync\", loginProvider, providerKey);\n            var result = await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n            {\n                var userDto = await _platformSecurityApi.GetUserByLoginAsync(loginProvider, providerKey);\n\n                return await PrepareUserResultAsync(cacheEntry, userDto);\n            }, cacheNullValue: false);\n\n\n            //Load user associated contact\n            if (result != null && result.ContactId != null)\n            {\n                result.Contact = await _memberService.GetContactByIdAsync(result.ContactId);\n            }\n\n            return result;\n        }\n\n        public Task<IList<UserLoginInfo>> GetLoginsAsync(User user, CancellationToken cancellationToken)\n        {\n            IList<UserLoginInfo> result = user.ExternalLogins?.Select(x => new UserLoginInfo(x.LoginProvider, x.ProviderKey, x.ProviderDisplayName)).ToList();\n            return Task.FromResult(result);\n        }\n\n        public Task RemoveLoginAsync(User user, string loginProvider, string providerKey, CancellationToken cancellationToken)\n        {\n            var existUserLogin = user.ExternalLogins?.FirstOrDefault(x => x.LoginProvider.EqualsInvariant(loginProvider) && x.ProviderKey.EqualsInvariant(providerKey));\n            if (existUserLogin != null)\n            {\n                user.ExternalLogins.Remove(existUserLogin);\n            }\n\n            return Task.CompletedTask;\n        }\n\n        #endregion\n\n        #region IUserPasswordStore<User> members\n\n        public Task<string> GetPasswordHashAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.PasswordHash);\n        }\n\n        public Task<bool> HasPasswordAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.PasswordHash != null);\n        }\n\n        public Task SetPasswordHashAsync(User user, string passwordHash, CancellationToken cancellationToken)\n        {\n            user.PasswordHash = passwordHash;\n            return Task.CompletedTask;\n        }\n\n        #endregion\n\n        #region IUserSecurityStampStore<User> members\n\n        public Task SetSecurityStampAsync(User user, string stamp, CancellationToken cancellationToken)\n        {\n            user.SecurityStamp = stamp;\n            return Task.CompletedTask;\n        }\n\n        public Task<string> GetSecurityStampAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.SecurityStamp);\n        }\n\n        #endregion\n\n        #region IUserPhoneNumberStore<User> members\n\n        public Task SetPhoneNumberAsync(User user, string phoneNumber, CancellationToken cancellationToken)\n        {\n            user.PhoneNumber = phoneNumber;\n            return Task.CompletedTask;\n        }\n\n        public Task<string> GetPhoneNumberAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.PhoneNumber);\n        }\n\n        public Task<bool> GetPhoneNumberConfirmedAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.PhoneNumberConfirmed);\n        }\n\n        public Task SetPhoneNumberConfirmedAsync(User user, bool confirmed, CancellationToken cancellationToken)\n        {\n            user.PhoneNumberConfirmed = confirmed;\n            return Task.CompletedTask;\n        }\n\n        #endregion\n\n        public Task SetTwoFactorEnabledAsync(User user, bool enabled, CancellationToken cancellationToken)\n        {\n            user.TwoFactorEnabled = enabled;\n            return Task.CompletedTask;\n        }\n\n        public Task<bool> GetTwoFactorEnabledAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.TwoFactorEnabled);\n        }\n\n        #region IUserClaimStore<User> members\n\n        public Task<IList<Claim>> GetClaimsAsync(User user, CancellationToken cancellationToken)\n        {\n            IList<Claim> result = new List<Claim>();\n            if (user.IsAdministrator)\n            {\n                result.Add(new Claim(ClaimTypes.Role, SecurityConstants.Roles.Administrator));\n            }\n\n            if (user.SelectedCurrencyCode != null)\n            {\n                result.Add(new Claim(SecurityConstants.Claims.CurrencyClaimType, user.SelectedCurrencyCode));\n            }\n\n            if (!string.IsNullOrEmpty(user.OperatorUserName))\n            {\n                result.Add(new Claim(SecurityConstants.Claims.OperatorUserNameClaimType, user.OperatorUserName));\n            }\n\n            if (!string.IsNullOrEmpty(user.OperatorUserId))\n            {\n                result.Add(new Claim(SecurityConstants.Claims.OperatorUserIdClaimType, user.OperatorUserId));\n                result.Add(new Claim(SecurityConstants.Claims.OperatorUserNameClaimType, user.OperatorUserName));\n            }\n\n            if (!user.Permissions.IsNullOrEmpty())\n            {\n                foreach (var permission in user.Permissions)\n                {\n                    result.Add(new Claim(SecurityConstants.Claims.PermissionClaimType, permission));\n                }\n            }\n\n            if (!user.Roles.IsNullOrEmpty())\n            {\n                foreach (var role in user.Roles)\n                {\n                    result.Add(new Claim(ClaimTypes.Role, role.Id));\n                }\n            }\n\n            return Task.FromResult(result);\n        }\n\n        public Task AddClaimsAsync(User user, IEnumerable<Claim> claims, CancellationToken cancellationToken)\n        {\n            return Task.CompletedTask;\n        }\n\n        public Task ReplaceClaimAsync(User user, Claim claim, Claim newClaim, CancellationToken cancellationToken)\n        {\n            return Task.CompletedTask;\n        }\n\n        public Task RemoveClaimsAsync(User user, IEnumerable<Claim> claims, CancellationToken cancellationToken)\n        {\n            throw new NotImplementedException();\n        }\n\n        public Task<IList<User>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken)\n        {\n            IList<User> result = new List<User>();\n            return Task.FromResult(result);\n        }\n\n        #endregion\n\n        #region IRoleStore<Role> members\n\n        public Task<string> GetRoleIdAsync(Role role, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(role.Id);\n        }\n\n        public Task<string> GetRoleNameAsync(Role role, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(role.Name);\n        }\n\n        public Task SetRoleNameAsync(Role role, string roleName, CancellationToken cancellationToken)\n        {\n            role.Name = roleName;\n            return Task.CompletedTask;\n        }\n\n        public Task<string> GetNormalizedRoleNameAsync(Role role, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(role.Name);\n        }\n\n        public Task SetNormalizedRoleNameAsync(Role role, string normalizedName, CancellationToken cancellationToken)\n        {\n            role.Name = normalizedName;\n            return Task.CompletedTask;\n        }\n\n        async Task<Role> IRoleStore<Role>.FindByIdAsync(string roleId, CancellationToken cancellationToken)\n        {\n            var result = (await _platformSecurityApi.GetRoleAsync(roleId))?.ToRole();\n            return result;\n        }\n\n        Task<Role> IRoleStore<Role>.FindByNameAsync(string normalizedRoleName, CancellationToken cancellationToken)\n        {\n            throw new NotImplementedException();\n        }\n\n        #endregion\n\n        #region IUserAuthenticatorKeyStore<User>\n\n        public Task SetAuthenticatorKeyAsync(User user, string key, CancellationToken cancellationToken)\n        {\n            user.TwoFactorAuthenticatorKey = key;\n            return Task.CompletedTask;\n        }\n\n        public Task<string> GetAuthenticatorKeyAsync(User user, CancellationToken cancellationToken)\n        {\n            return Task.FromResult(user.TwoFactorAuthenticatorKey);\n        }\n\n        #endregion IUserAuthenticatorKeyStore<User>\n\n        public void Dispose()\n        {\n            // Cleanup\n        }\n\n\n        private Task<User> PrepareUserResultAsync(MemoryCacheEntryOptions options, AutoRestClients.PlatformModuleApi.Models.ApplicationUser userDto)\n        {\n            User result = null;\n            if (userDto != null)\n            {\n                result = userDto.ToUser();\n                options.AddExpirationToken(_apiChangesWatcher.CreateChangeToken());\n                options.AddExpirationToken(new PollingApiUserChangeToken(_platformSecurityApi, _options.ChangesPollingInterval));\n                options.AddExpirationToken(SecurityCacheRegion.CreateChangeToken(userDto.Id));\n\n            }\n            return Task.FromResult(result);\n        }\n        private async Task<IdentityResult> SaveAsync(Role role, CancellationToken cancellationToken)\n        {\n            var result = IdentityResult.Success;\n            await _platformSecurityApi.UpdateRoleAsync(role.ToRoleDto(), cancellationToken);\n            return result;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/SeoInfoService.cs",
    "content": "using System;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi;\nusing VirtoCommerce.Storefront.Common;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.StaticContent;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class SeoInfoService : ISeoInfoService\n    {\n        private readonly ICommerce _coreModuleApi;\n\n        public SeoInfoService(ICommerce coreModuleApi)\n        {\n            _coreModuleApi = coreModuleApi;\n        }\n\n        public async Task<SeoInfo[]> GetSeoInfosBySlug(string slug)\n        {\n            var result = (await _coreModuleApi.GetSeoInfoBySlugAsync(slug)).Select(x => x.ToSeoInfo()).ToArray();\n\n            return result;\n        }\n\n        public async Task<SeoInfo[]> GetBestMatchingSeoInfos(string slug, Store store, string currentCulture)\n        {\n            var result = (await _coreModuleApi.GetSeoInfoBySlugAsync(slug)).GetBestMatchingSeoInfos(store, currentCulture, slug).Select(x => x.ToSeoInfo()).ToArray();\n\n            return result;\n        }\n\n        public ContentItem GetContentItem(string slug, WorkContext context)\n        {\n            ContentItem result = null;\n            var pageUrl = slug == \"__index__home__page__\" ? \"/\" : $\"/{slug}\";\n            try\n            {\n                var pages = context.Pages.Where(p =>\n                    string.Equals(p.Url, pageUrl, StringComparison.OrdinalIgnoreCase)\n                    || string.Equals(p.Url, slug, StringComparison.OrdinalIgnoreCase)\n                );\n\n                var page = pages.FirstOrDefault(x => x.Language.CultureName.EqualsInvariant(context.CurrentLanguage.CultureName))\n                           ?? pages.FirstOrDefault(x => x.Language.IsInvariant)\n                           ?? pages.FirstOrDefault(x => x.AliasesUrls.Contains(pageUrl, StringComparer.OrdinalIgnoreCase));\n                result = page;\n\n            }\n            catch\n            {\n                //do nothing\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/SpaRouteService.cs",
    "content": "using System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text.RegularExpressions;\nusing System.Threading.Tasks;\nusing Newtonsoft.Json;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\nusing VirtoCommerce.Storefront.Model.StaticContent;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class SpaRouteService : ISpaRouteService\n    {\n        private readonly IContentBlobProvider _contentBlobProvider;\n        private readonly IStorefrontMemoryCache _memoryCache;\n        private readonly IWorkContextAccessor _workContextAccessor;\n\n        public SpaRouteService(\n            IContentBlobProvider contentBlobProvider,\n            IStorefrontMemoryCache memoryCache,\n            IWorkContextAccessor workContextAccessor)\n        {\n            _contentBlobProvider = contentBlobProvider;\n            _memoryCache = memoryCache;\n            _workContextAccessor = workContextAccessor;\n        }\n\n        public virtual async Task<bool> IsSpaRoute(string route)\n        {\n            var workContext = _workContextAccessor.WorkContext;\n            var cacheKey = CacheKey.With(GetType(), nameof(IsSpaRoute), workContext.CurrentStore.Id, route);\n            var result = await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (_) =>\n            {\n                var routes = await GetSpaRoutes();\n\n                var isSpaRoute = routes.Any(jsPattern =>\n                {\n                    // Input sample: jsPattern = \"/^\\\\/account\\\\/profile\\\\/?$/i\"\n                    // Only the char \"i\" can be an ending. The others chars are not used\n                    // when generating RegExp patterns in the `routes.json` file.\n                    var options = jsPattern.EndsWith(\"i\") ? RegexOptions.IgnoreCase : RegexOptions.None;\n                    var pattern = Regex.Replace(jsPattern, @\"^\\/|\\/i?$\", string.Empty);\n\n                    return Regex.IsMatch(route, pattern, options);\n                });\n\n                return isSpaRoute;\n            });\n\n            return result;\n        }\n\n        protected virtual async Task<List<string>> GetSpaRoutes()\n        {\n            var workContext = _workContextAccessor.WorkContext;\n            var cacheKey = CacheKey.With(GetType(), nameof(GetSpaRoutes), workContext.CurrentStore.Id);\n            var routes = await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (_) =>\n            {\n                var result = new List<string>();\n                var currentThemeName = !string.IsNullOrEmpty(workContext.CurrentStore.ThemeName) ? workContext.CurrentStore.ThemeName : \"default\";\n                var currentThemePath = Path.Combine(\"Themes\", workContext.CurrentStore.Id, currentThemeName);\n                var currentThemeSettingPath = Path.Combine(currentThemePath, \"config\", \"routes.json\");\n\n                if (_contentBlobProvider.PathExists(currentThemeSettingPath))\n                {\n                    await using var stream = _contentBlobProvider.OpenRead(currentThemeSettingPath);\n                    result = JsonConvert.DeserializeObject<List<string>>(await stream.ReadToStringAsync());\n                }\n\n                return result;\n            });\n\n            return routes;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/StaticContent/LinkListConverter.cs",
    "content": "using System.Linq;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing contentDto = VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi.Models;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n\n\n    public static partial class LinkListConverter\n    {\n        public static MenuLinkList ToMenuLinkList(this contentDto.MenuLinkList menuLinkListDto)\n        {\n            var result = new MenuLinkList\n            {\n                Id = menuLinkListDto.Id,\n                Name = menuLinkListDto.Name?.Handelize(),\n                StoreId = menuLinkListDto.StoreId,\n\n\n                Language = string.IsNullOrEmpty(menuLinkListDto.Language) ? Language.InvariantLanguage : new Language(menuLinkListDto.Language)\n            };\n\n            if (menuLinkListDto.MenuLinks != null)\n            {\n                result.MenuLinks = menuLinkListDto.MenuLinks.Select(ToMenuLink).ToList();\n            }\n\n            return result;\n        }\n\n        public static MenuLink ToMenuLink(this contentDto.MenuLink menuLinkDto)\n        {\n            var result = new MenuLink();\n            if (menuLinkDto.AssociatedObjectType != null)\n            {\n                if (\"product\" == menuLinkDto.AssociatedObjectType.ToLowerInvariant())\n                {\n                    result = new ProductMenuLink();\n                }\n                else if (\"category\" == menuLinkDto.AssociatedObjectType.ToLowerInvariant())\n                {\n                    result = new CategoryMenuLink();\n                }\n            }\n            result.Id = menuLinkDto.Id;\n            result.AssociatedObjectId = menuLinkDto.AssociatedObjectId;\n            result.AssociatedObjectType = menuLinkDto.AssociatedObjectType;\n            result.Priority = menuLinkDto.Priority ?? 0;\n            result.Title = menuLinkDto.Title;\n            result.Url = menuLinkDto.Url;\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/StaticContent/LinkListServiceImpl.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.Caching.Memory;\nusing VirtoCommerce.Storefront.AutoRestClients.ContentModuleApi;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\nusing VirtoCommerce.Storefront.Model.LinkList.Services;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class MenuLinkListServiceImpl : IMenuLinkListService\n    {\n        private readonly IMenu _cmsApi;\n        private readonly IStorefrontMemoryCache _memoryCache;\n        private readonly IApiChangesWatcher _apiChangesWatcher;\n        public MenuLinkListServiceImpl(IMenu cmsApi, IStorefrontMemoryCache memoryCache, IApiChangesWatcher apiChangesWatcher)\n        {\n            _cmsApi = cmsApi;\n            _memoryCache = memoryCache;\n            _apiChangesWatcher = apiChangesWatcher;\n        }\n        public IList<MenuLinkList> LoadAllStoreLinkLists(Store store, Language language)\n        {\n            return LoadAllStoreLinkListsAsync(store, language).GetAwaiter().GetResult();\n        }\n\n        public Task<IList<MenuLinkList>> LoadAllStoreLinkListsAsync(Store store, Language language)\n        {\n            if (store == null)\n            {\n                throw new ArgumentNullException(nameof(store));\n            }\n\n            return LoadAllStoreLinkListsInternalAsync(store, language);\n        }\n\n        public async Task<IList<MenuLinkList>> LoadAllStoreLinkListsInternalAsync(Store store, Language language)\n        {\n            var cacheKey = CacheKey.With(GetType(), \"LoadAllStoreLinkLists\", store.Id, language.CultureName);\n            return await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n            {\n                cacheEntry.AddExpirationToken(StaticContentCacheRegion.CreateChangeToken());\n                cacheEntry.AddExpirationToken(_apiChangesWatcher.CreateChangeToken());\n\n                var result = new List<MenuLinkList>();\n                var listsDto = await _cmsApi.GetListsAsync(store.Id);\n                if (listsDto != null)\n                {\n                    result.AddRange(listsDto.Select(x => x.ToMenuLinkList()));\n                }\n\n                result = result.GroupBy(x => x.Name).Select(x => x.FindWithLanguage(language)).Where(x => x != null).ToList();\n\n\n                return result.ToList();\n            });\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/StaticContent/MarkdownContentLoader.cs",
    "content": "using Markdig;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class MarkdownContentLoader : StaticContentLoader\n    {\n        private readonly MarkdownPipeline _markdownPipeline;\n\n        public MarkdownContentLoader(MarkdownPipeline markdownPipeline)\n        {\n            _markdownPipeline = markdownPipeline;\n        }\n\n        public override string PrepareContent(string content)\n        {\n            return Markdown.ToHtml(base.PrepareContent(content), _markdownPipeline);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/StaticContent/PageBuilderContentLoader.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\nusing VirtoCommerce.Storefront.Model.StaticContent;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class PageBuilderContentLoader : IStaticContentLoader\n    {\n        public string PrepareContent(string content)\n        {\n            return content;\n        }\n\n        public void ReadMetaData(string content, IDictionary<string, IEnumerable<string>> metadata)\n        {\n            var page = JsonConvert.DeserializeObject<JObject>(content);\n            var settings = page.GetValue(\"settings\");\n            var items = settings.AsJEnumerable();\n            foreach (var item in items.OfType<JProperty>())\n            {\n                metadata.Add(item.Name, new List<string> { item.Value.ToString() });\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/StaticContent/StaticContentCacheRegion.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common.Caching;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class StaticContentCacheRegion : CancellableCacheRegion<StaticContentCacheRegion>\n    {\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/StaticContent/StaticContentItemFactory.cs",
    "content": "using System.IO;\nusing System.Text.RegularExpressions;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.StaticContent;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class StaticContentItemFactory : IStaticContentItemFactory\n    {\n        private static readonly Regex _blogMatchRegex = new Regex(@\"blogs/(?<blog>[^\\/]*)\\/([^\\/]*)\\.[^\\.]+$\", RegexOptions.Compiled);\n\n        public ContentItem GetItemFromPath(string path)\n        {\n            ContentItem retVal = null;\n            if (!string.IsNullOrEmpty(path))\n            {\n                //Blog\n                var blogMatch = _blogMatchRegex.Match(path);\n                if (blogMatch.Success)\n                {\n                    var blogName = blogMatch.Groups[\"blog\"].Value;\n                    var fileName = Path.GetFileNameWithoutExtension(path);\n                    if (fileName.EqualsInvariant(blogName) || fileName.EqualsInvariant(\"default\"))\n                    {\n                        retVal = new Blog()\n                        {\n                            Name = blogName,\n                        };\n                    }\n                    else\n                    {\n                        retVal = new BlogArticle()\n                        {\n                            BlogName = blogName\n                        };\n                    }\n                }\n                else\n                {\n                    retVal = new ContentPage();\n                }\n            }\n\n            return retVal;\n        }\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/StaticContent/StaticContentLoader.cs",
    "content": "using System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text.RegularExpressions;\nusing VirtoCommerce.Storefront.Model.StaticContent;\nusing YamlDotNet.RepresentationModel;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class StaticContentLoader : IStaticContentLoader\n    {\n        private static readonly Regex _headerRegExp = new Regex(@\"(?s:^---(.*?)---)\");\n\n        public virtual string PrepareContent(string content)\n        {\n            return RemoveYamlHeader(content);\n        }\n\n        public virtual void ReadMetaData(string content, IDictionary<string, IEnumerable<string>> metadata)\n        {\n            ReadYamlHeader(content, metadata);\n        }\n\n\n        private static string RemoveYamlHeader(string text)\n        {\n            var result = text;\n            var headerMatches = _headerRegExp.Matches(text);\n\n            if (headerMatches.Count > 0)\n            {\n                result = text.Replace(headerMatches[0].Groups[0].Value, \"\").Trim();\n            }\n\n            return result;\n        }\n\n        private static void ReadYamlHeader(string text, IDictionary<string, IEnumerable<string>> metadata)\n        {\n            var headerMatches = _headerRegExp.Matches(text);\n\n            if (headerMatches.Count > 0)\n            {\n                var input = new StringReader(headerMatches[0].Groups[1].Value);\n                var yaml = new YamlStream();\n\n                yaml.Load(input);\n\n                if (yaml.Documents.Count > 0)\n                {\n                    var root = yaml.Documents[0].RootNode;\n                    if (root is YamlMappingNode collection)\n                    {\n                        foreach (var entry in collection.Children)\n                        {\n                            if (entry.Key is YamlScalarNode node)\n                            {\n                                metadata.Add(node.Value, GetYamlNodeValues(entry.Value));\n                            }\n                        }\n                    }\n                }\n            }\n        }\n\n        private static IEnumerable<string> GetYamlNodeValues(YamlNode value)\n        {\n            var result = new List<string>();\n\n            if (value is YamlSequenceNode list)\n            {\n                result.AddRange(list.Children.OfType<YamlScalarNode>().Select(node => node.Value));\n            }\n            else\n            {\n                result.Add(value.ToString());\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/StaticContent/StaticContentLoaderFactory.cs",
    "content": "using System.IO;\nusing Markdig;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.StaticContent;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class StaticContentLoaderFactory : IStaticContentLoaderFactory\n    {\n        public IStaticContentLoader CreateLoader(ContentItem contentItem)\n        {\n            switch (Path.GetExtension(contentItem.StoragePath))\n            {\n                case string value when value.EqualsInvariant(\".PAGE\") || value.EqualsInvariant(\".JSON\"):\n                    return new PageBuilderContentLoader();\n                case string value when value.EqualsInvariant(\".MD\"):\n                    return new MarkdownContentLoader(new MarkdownPipelineBuilder().UseAdvancedExtensions().Build());\n                default:\n                    return new StaticContentLoader();\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/StaticContent/StaticContentService.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing Microsoft.Extensions.Caching.Memory;\nusing Microsoft.Extensions.Primitives;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\nusing VirtoCommerce.Storefront.Model.StaticContent;\nusing VirtoCommerce.Storefront.Model.Stores;\nusing VirtoCommerce.Tools;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    /// <summary>\n    /// Represent a search and rendering static content (pages and blogs)\n    /// </summary>\n    public class StaticContentService : IStaticContentService\n    {\n        private static readonly string[] _extensions = { \".md\", \".html\", \".page\", \".template\", \".json\" };\n        private readonly IStaticContentItemFactory _contentItemFactory;\n        private readonly IContentBlobProvider _contentBlobProvider;\n        private readonly IStorefrontMemoryCache _memoryCache;\n        private readonly IStaticContentLoaderFactory _metadataFactory;\n\n        public StaticContentService(IStorefrontMemoryCache memoryCache, IStaticContentItemFactory contentItemFactory,\n                                        IContentBlobProvider contentBlobProvider, IStaticContentLoaderFactory metadataFactory)\n        {\n            _contentItemFactory = contentItemFactory;\n            _contentBlobProvider = contentBlobProvider;\n            _memoryCache = memoryCache;\n            _metadataFactory = metadataFactory;\n        }\n\n        #region IStaticContentService Members\n\n        public IEnumerable<ContentItem> LoadStoreStaticContent(Store store, string type, bool force = false)\n        {\n            var theme = store.ThemeName ?? \"default\";\n            var baseStoreContentPath = Path.Combine(\"Themes\", store.Id, theme, \"content\", type);\n\n            if (force)\n            {\n                var retVal = ReadContentInternal(baseStoreContentPath);\n                return retVal.ToArray();\n            }\n\n            var cacheKey = CacheKey.With(GetType(), \"LoadStoreStaticContent\", store.Id, type, theme);\n            return _memoryCache.GetOrCreateExclusive(cacheKey, (cacheEntry) =>\n            {\n                cacheEntry.AddExpirationToken(new CompositeChangeToken(new[]\n                {\n                    StaticContentCacheRegion.CreateChangeToken(),\n                    _contentBlobProvider.Watch(baseStoreContentPath + \"/**/*\")\n                }));\n                var retVal = ReadContentInternal(baseStoreContentPath);\n                return retVal.ToArray();\n            });\n        }\n\n        private ContentItem[] ReadContentInternal(string baseStoreContentPath)\n        {\n            var retVal = new List<ContentItem>();\n            const string searchPattern = \"*.*\";\n\n            if (!_contentBlobProvider.PathExists(baseStoreContentPath))\n            {\n                return retVal.ToArray();\n            }\n\n            // Search files by requested search pattern\n            var contentBlobs = _contentBlobProvider.Search(baseStoreContentPath, searchPattern, true)\n                .Where(x => _extensions.Any(x.EndsWith))\n                .Select(x => x.Replace(\"\\\\\\\\\", \"\\\\\"));\n\n            // each content file  has a name pattern {name}.{language?}.{ext}\n            var localizedBlobs = contentBlobs.Select(x => new LocalizedBlobInfo(x));\n\n            foreach (var localizedBlob in localizedBlobs.OrderBy(x => x.Name))\n            {\n                var blobRelativePath = \"/\" + localizedBlob.Path.TrimStart('/');\n                var contentItem = _contentItemFactory.GetItemFromPath(blobRelativePath);\n\n                if (contentItem == null)\n                {\n                    continue;\n                }\n\n                contentItem.Name ??= localizedBlob.Name;\n\n                contentItem.Language = localizedBlob.Language;\n                contentItem.FileName = Path.GetFileName(blobRelativePath);\n                contentItem.StoragePath = \"/\" + blobRelativePath.Replace(baseStoreContentPath + \"/\", string.Empty).TrimStart('/');\n                LoadAndRenderContentItem(blobRelativePath, contentItem);\n                retVal.Add(contentItem);\n            }\n\n            return retVal.ToArray();\n        }\n\n        #endregion\n\n        private void LoadAndRenderContentItem(string contentPath, ContentItem contentItem)\n        {\n            string content;\n            using (var stream = _contentBlobProvider.OpenRead(contentPath))\n            {\n                // Load raw content with metadata\n                content = stream.ReadToString();\n            }\n\n            IDictionary<string, IEnumerable<string>> metaHeaders = new Dictionary<string, IEnumerable<string>>();\n            var metadataReader = _metadataFactory.CreateLoader(contentItem);\n\n            try\n            {\n                metadataReader.ReadMetaData(content, metaHeaders);\n            }\n            catch (Exception ex) // NOTE: Exception must have a specific type!\n            {\n                var error = $\"Failed to parse metadata from \\\"{contentItem.StoragePath}\\\"<br/>{ex.Message}\";\n                content = $\"{error}<br/>{content}\";\n            }\n\n            content = metadataReader.PrepareContent(content);\n            contentItem.LoadContent(content, metaHeaders);\n\n            if (string.IsNullOrEmpty(contentItem.Permalink))\n            {\n                contentItem.Permalink = \":folder/:categories/:title\";\n            }\n\n            // Transform permalink template to url\n            contentItem.Url = GetContentItemUrl(contentItem, contentItem.Permalink);\n            // Transform aliases permalink templates to urls\n            contentItem.AliasesUrls = contentItem.Aliases.Select(x => GetContentItemUrl(contentItem, x)).ToList();\n        }\n\n        private static string GetContentItemUrl(ContentItem item, string permalink)\n        {\n            return new FrontMatterPermalink\n            {\n                UrlTemplate = permalink,\n                Categories = item.Categories,\n                Date = item.CreatedDate,\n                FilePath = item.StoragePath\n            }.ToUrl();\n        }\n\n        // each content file  has a name pattern {name}.{language?}.{ext}\n        private class LocalizedBlobInfo\n        {\n            public LocalizedBlobInfo(string blobPath)\n            {\n                Path = blobPath;\n                Language = Language.InvariantLanguage;\n\n                var parts = System.IO.Path.GetFileName(blobPath)?.Split('.');\n                Name = parts?.FirstOrDefault();\n\n                if (parts?.Length == 3)\n                {\n                    try\n                    {\n                        Language = new Language(parts[1]);\n                    }\n                    catch (Exception)\n                    {\n                        Language = Language.InvariantLanguage;\n                    }\n                }\n            }\n\n            public string Name { get; }\n            public Language Language { get; }\n            public string Path { get; }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/StaticContent/StaticContentWorkContextBuilderExtensions.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.DependencyInjection;\nusing PagedList.Core;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.LinkList.Services;\nusing VirtoCommerce.Storefront.Model.StaticContent;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public static class StaticContentWorkContextBuilderExtensions\n    {\n        public static Task WithMenuLinksAsync(this IWorkContextBuilder builder, IMutablePagedList<MenuLinkList> linkLists)\n        {\n            builder.WorkContext.CurrentLinkLists = linkLists;\n            return Task.CompletedTask;\n        }\n\n        public static Task WithMenuLinksAsync(this IWorkContextBuilder builder, Store store, Language language)\n        {\n            if (store == null)\n            {\n                throw new ArgumentNullException(nameof(store));\n            }\n            if (language == null)\n            {\n                throw new ArgumentNullException(nameof(language));\n            }\n\n            var serviceProvider = builder.HttpContext.RequestServices;\n            var linkListService = serviceProvider.GetRequiredService<IMenuLinkListService>();\n\n            IPagedList<MenuLinkList> Factory(int pageNumber, int pageSize, IEnumerable<SortInfo> sorInfos)\n            {\n                var linkLists = linkListService.LoadAllStoreLinkLists(store, language);\n                return new StaticPagedList<MenuLinkList>(linkLists, pageNumber, pageSize, linkLists.Count());\n            }\n\n            return builder.WithMenuLinksAsync(new MutablePagedList<MenuLinkList>((Func<int, int, IEnumerable<SortInfo>, IPagedList<MenuLinkList>>)Factory, 1, 20));\n        }\n\n        public static Task WithPagesAsync(this IWorkContextBuilder builder, IMutablePagedList<ContentItem> pages)\n        {\n            builder.WorkContext.Pages = pages;\n            return Task.CompletedTask;\n        }\n\n        public static Task WithPagesAsync(this IWorkContextBuilder builder, Store store, Language language)\n        {\n            if (store == null)\n            {\n                throw new ArgumentNullException(nameof(store));\n            }\n            if (language == null)\n            {\n                throw new ArgumentNullException(nameof(language));\n            }\n\n            var serviceProvider = builder.HttpContext.RequestServices;\n            var staticContentService = serviceProvider.GetRequiredService<IStaticContentService>();\n\n            // all static content items\n            IPagedList<ContentItem> Factory(int pageNumber, int pageSize, IEnumerable<SortInfo> sorInfos)\n            {\n                var contentItems = staticContentService.LoadStoreStaticContent(store, \"pages\", builder.WorkContext.IsPreviewMode);\n                return new StaticPagedList<ContentItem>(contentItems, pageNumber, pageSize, contentItems.Count());\n            }\n\n            return builder.WithPagesAsync(new MutablePagedList<ContentItem>((Func<int, int, IEnumerable<SortInfo>, IPagedList<ContentItem>>)Factory, 1, 20));\n        }\n\n        public static Task WithBlogsAsync(this IWorkContextBuilder builder, IMutablePagedList<Blog> blogs)\n        {\n            builder.WorkContext.Blogs = blogs;\n            return Task.CompletedTask;\n        }\n\n        public static Task WithBlogsAsync(this IWorkContextBuilder builder, Store store, Language language)\n        {\n            if (store == null)\n            {\n                throw new ArgumentNullException(nameof(store));\n            }\n            if (language == null)\n            {\n                throw new ArgumentNullException(nameof(language));\n            }\n\n            var serviceProvider = builder.HttpContext.RequestServices;\n            var staticContentService = serviceProvider.GetRequiredService<IStaticContentService>();\n\n            IPagedList<Blog> Factory(int pageNumber, int pageSize, IEnumerable<SortInfo> sorInfos)\n            {\n                var contentItems = staticContentService.LoadStoreStaticContent(store, \"blogs\", builder.WorkContext.IsPreviewMode).Where(x => x.Language.IsInvariant || x.Language == language);\n                var blogs = contentItems.OfType<Blog>().ToArray();\n                var blogArticlesGroup = contentItems.OfType<BlogArticle>().GroupBy(x => x.BlogName, x => x).ToList();\n                foreach (var blog in blogs)\n                {\n                    var blogArticles = blogArticlesGroup.FirstOrDefault(x => string.Equals(x.Key, blog.Name, StringComparison.OrdinalIgnoreCase));\n                    if (blogArticles != null)\n                    {\n                        blog.Articles = new MutablePagedList<BlogArticle>(blogArticles);\n                    }\n                }\n\n                return new StaticPagedList<Blog>(blogs, pageNumber, pageSize, blogs.Count());\n            }\n\n            // Initialize blogs search criteria \n            builder.WorkContext.CurrentBlogSearchCritera = new BlogSearchCriteria(builder.WorkContext.QueryString);\n\n            return builder.WithBlogsAsync(new MutablePagedList<Blog>(Factory, 1, 20));\n        }\n\n        public static Task WithTemplatesAsync(this IWorkContextBuilder builder, IMutablePagedList<ContentItem> templates)\n        {\n            builder.WorkContext.Templates = templates;\n            return Task.CompletedTask;\n        }\n\n        public static Task WithTemplatesAsync(this IWorkContextBuilder builder, Store store)\n        {\n            if (store == null)\n            {\n                throw new ArgumentNullException(nameof(store));\n            }\n\n            var serviceProvider = builder.HttpContext.RequestServices;\n            var staticContentService = serviceProvider.GetRequiredService<IStaticContentService>();\n\n            // all static content items\n            IPagedList<ContentItem> Factory(int pageNumber, int pageSize, IEnumerable<SortInfo> sorInfos)\n            {\n                var contentItems = staticContentService.LoadStoreStaticContent(store, \"templates\", builder.WorkContext.IsPreviewMode);\n                return new StaticPagedList<ContentItem>(contentItems, pageNumber, pageSize, contentItems.Count());\n            }\n\n            return builder.WithTemplatesAsync(new MutablePagedList<ContentItem>(Factory, 1, 20));\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Stores/SelectCurrentCurrencyPolicy.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\nusing System.Security.Claims;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.Extensions.Primitives;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Security;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public static class SelectCurrentCurrencyPolicy\n    {\n        public static Currency GetCurrentCurrency(this HttpContext context, IEnumerable<Currency> currencies, Store store)\n        {\n            //Try get default store currency first\n            var result = currencies.FirstOrDefault(x => x.Equals(store.DefaultCurrencyCode));\n            //Try get currency from request url  \n            StringValues currencyCode;\n            if (!context.Request.Query.TryGetValue(\"currency\", out currencyCode))\n            {\n                //Next try get from claims\n                currencyCode = context.User.FindFirstValue(SecurityConstants.Claims.CurrencyClaimType);\n            }\n            //Get store default currency if currency not in the supported by stores list\n            if (!string.IsNullOrEmpty(currencyCode))\n            {\n                result = currencies.FirstOrDefault(x => x.Equals(currencyCode.First())) ?? result;\n            }\n            return result;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Stores/SelectCurrentLanguagePolicy.cs",
    "content": "using System;\nusing System.Linq;\nusing System.Text.RegularExpressions;\nusing Microsoft.AspNetCore.Http;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public static class SelectCurrentLanguagePolicy\n    {\n        public static Language GetCurrentLanguage(this HttpContext context, Store store)\n        {\n            if (store == null)\n            {\n                throw new ArgumentNullException(nameof(store));\n            }\n\n            //Try to get language from request\n            var result = store.DefaultLanguage;\n            var regexpPattern = string.Format(@\"\\/({0})\\/?\", string.Join(\"|\", store.Languages.Select(x => x.CultureName)));\n            var match = Regex.Match(context.Request.Path, regexpPattern, RegexOptions.IgnoreCase);\n            if (match.Success && match.Groups.Count > 1)\n            {\n                var language = new Language(match.Groups[1].Value);\n                //Get store default language if language not in the supported by stores list\n                result = store.Languages.Contains(language) ? language : result;\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Stores/SelectCurrentStorePolicy.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Microsoft.ApplicationInsights.AspNetCore.Extensions;\nusing Microsoft.AspNetCore.Http;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public static class SelectCurrentStorePolicy\n    {\n        public static Store GetCurrentStore(this HttpContext context, IEnumerable<Store> stores, string defaultStoreId)\n        {\n            if (stores == null)\n            {\n                throw new ArgumentNullException(nameof(stores));\n            }\n\n            //Try first find by store url (if it defined)\n            var result = stores.FirstOrDefault(x => context.Request.Path.StartsWithSegments(new PathString(\"/\" + x.Id)));\n\n            if (result == null)\n            {\n                result = stores.FirstOrDefault(x => x.IsStoreUrl(context.Request.GetUri()));\n            }\n            if (result == null && defaultStoreId != null)\n            {\n                result = stores.FirstOrDefault(x => x.Id.EqualsInvariant(defaultStoreId));\n            }\n            if (result == null)\n            {\n                result = stores.FirstOrDefault();\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Stores/StoreCacheRegion.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common.Caching;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class StoreCacheRegion : CancellableCacheRegion<StoreCacheRegion>\n    {\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Stores/StoreConverter.cs",
    "content": "using System;\nusing System.Linq;\nusing VirtoCommerce.Storefront.Common;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Stores;\nusing coreDto = VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi.Models;\nusing platformDto = VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi.Models;\nusing storeDto = VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.Models;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n\n    public static partial class StoreConverter\n    {\n        public static SeoInfo ToSeoInfo(this storeDto.SeoInfo seoDto)\n        {\n            return seoDto.JsonConvert<coreDto.SeoInfo>().ToSeoInfo();\n        }\n\n\n        public static DynamicProperty ToDynamicProperty(this storeDto.DynamicObjectProperty propertyDto)\n        {\n            return propertyDto.JsonConvert<platformDto.DynamicObjectProperty>().ToDynamicProperty();\n        }\n\n        public static Store ToStore(this storeDto.Store storeDto)\n        {\n            var result = new Store\n            {\n                AdminEmail = storeDto.AdminEmail,\n                Catalog = storeDto.Catalog,\n                Country = storeDto.Country,\n                Description = storeDto.Description,\n                Email = storeDto.Email,\n                Id = storeDto.Id,\n                Name = storeDto.Name,\n                Region = storeDto.Region,\n                SecureUrl = storeDto.SecureUrl,\n                TimeZone = storeDto.TimeZone,\n                Url = storeDto.Url,\n                DefaultFulfillmentCenterId = storeDto.MainFulfillmentCenterId,\n                AvailFulfillmentCenterIds = (storeDto.AdditionalFulfillmentCenterIds ?? Array.Empty<string>()).ToList(),\n            };\n\n            if (result.DefaultFulfillmentCenterId != null)\n            {\n                result.AvailFulfillmentCenterIds.Add(result.DefaultFulfillmentCenterId);\n            }\n\n            if (!storeDto.SeoInfos.IsNullOrEmpty())\n            {\n                result.SeoInfos = storeDto.SeoInfos.Select(ToSeoInfo).ToList();\n            }\n\n            result.DefaultLanguage = storeDto.DefaultLanguage != null ? new Language(storeDto.DefaultLanguage) : Language.InvariantLanguage;\n\n            if (!storeDto.Languages.IsNullOrEmpty())\n            {\n                result.Languages = storeDto.Languages.Select(x => new Language(x)).ToList();\n            }\n\n            result.CurrenciesCodes = storeDto.Currencies.Concat(new[] { storeDto.DefaultCurrency })\n                                                   .Where(x => !string.IsNullOrEmpty(x))\n                                                   .Distinct()\n                                                   .ToList();\n            result.DefaultCurrencyCode = storeDto.DefaultCurrency;\n\n            if (!storeDto.DynamicProperties.IsNullOrEmpty())\n            {\n                result.DynamicProperties = new MutablePagedList<DynamicProperty>(storeDto.DynamicProperties.Select(ToDynamicProperty).ToList());\n                result.ThemeName = result.DynamicProperties.GetDynamicPropertyValue(\"DefaultThemeName\");\n            }\n\n            if (!storeDto.Settings.IsNullOrEmpty())\n            {\n                result.Settings = new MutablePagedList<SettingEntry>(storeDto.Settings.Where(x => !x.ValueType.EqualsInvariant(\"SecureString\"))\n                                                                                      .Select(x => x.JsonConvert<platformDto.ObjectSettingEntry>()\n                                                                                      .ToSettingEntry()));\n            }\n\n            result.TrustedGroups = storeDto.TrustedGroups;\n            result.StoreState = EnumUtility.SafeParse(storeDto.StoreState, StoreStatus.Open);\n            result.SeoLinksType = EnumUtility.SafeParse(result.Settings.GetSettingValue(\"Stores.SeoLinksType\", \"\"), SeoLinksType.Collapsed);\n            result.QuotesEnabled = result.Settings.GetSettingValue(\"Quotes.EnableQuotes\", false);\n            result.SubscriptionEnabled = result.Settings.GetSettingValue(\"Subscription.EnableSubscriptions\", false);\n            result.TaxCalculationEnabled = result.Settings.GetSettingValue(\"Stores.TaxCalculationEnabled\", true);\n            result.AnonymousUsersAllowed = result.Settings.GetSettingValue(\"Stores.AllowAnonymousUsers\", true);\n            result.IsSpa = result.Settings.GetSettingValue(\"Stores.IsSpa\", false);\n            result.EmailVerificationEnabled = result.Settings.GetSettingValue(\"Stores.EmailVerificationEnabled\", false);\n            result.CreateAnonymousOrderEnabled = result.Settings.GetSettingValue(\"XOrder.CreateAnonymousOrderEnabled\", true);\n\n            result.CartValidationRuleSet = result.Settings.GetSettingValue<string>(\"Stores.CartValidationRuleSet\", null);\n            if (string.IsNullOrEmpty(result.CartValidationRuleSet))\n            {\n                result.CartValidationRuleSet = result.DynamicProperties?.GetDynamicPropertyValue(\"CartValidationRuleSet\");\n            }\n\n            return result;\n        }\n\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Stores/StoreService.cs",
    "content": "using System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.Caching.Memory;\nusing Microsoft.Extensions.Options;\nusing VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\nusing VirtoCommerce.Storefront.Model.Stores;\nusing StoreApi = VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.Models;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    /// <summary>\n    /// Data access object for stores implementation\n    /// </summary>\n    public class StoreService : IStoreService\n    {\n        private readonly IStoreModule _storeApi;\n        private readonly IStorefrontMemoryCache _memoryCache;\n        private readonly IApiChangesWatcher _apiChangesWatcher;\n        private readonly StorefrontOptions _storefrontOptions;\n\n        public StoreService(IStoreModule storeApi\n            , IStorefrontMemoryCache memoryCache\n            , IApiChangesWatcher apiChangesWatcher\n            , IOptions<StorefrontOptions> storefrontOptions)\n        {\n            _storeApi = storeApi;\n            _memoryCache = memoryCache;\n            _apiChangesWatcher = apiChangesWatcher;\n            _storefrontOptions = storefrontOptions.Value;\n        }\n        public async Task<Model.Stores.Store[]> GetAllStoresAsync()\n        {\n            var cacheKey = CacheKey.With(GetType(), \"GetAllStoresAsync\");\n            return await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n            {\n                cacheEntry.AddExpirationToken(StoreCacheRegion.CreateChangeToken());\n                cacheEntry.AddExpirationToken(_apiChangesWatcher.CreateChangeToken());\n\n                var storeDtos = await _storeApi.GetStoresAsync();\n                return await Task.WhenAll(storeDtos.Select(x => ConvertStoreAndLoadDependeciesAsync(x)));\n            }, cacheNullValue: false);\n        }\n\n        public async Task<Store> GetStoreByIdAsync(string id, Currency currency = null)\n        {\n            var cacheKey = CacheKey.With(GetType(), \"GetStoreByIdAsync\", id, currency?.ToString());\n            return await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n            {\n                cacheEntry.AddExpirationToken(StoreCacheRegion.CreateChangeToken());\n                cacheEntry.AddExpirationToken(_apiChangesWatcher.CreateChangeToken());\n\n                var storeDto = await _storeApi.GetStoreByIdAsync(id);\n                return await ConvertStoreAndLoadDependeciesAsync(storeDto, currency);\n            }, cacheNullValue: false);\n        }\n\n        protected virtual Task<Store> ConvertStoreAndLoadDependeciesAsync(StoreApi.Store storeDto, Currency currency = null)\n        {\n            var result = storeDto.ToStore();\n\n            //use url for stores from configuration file with hight priority than store url defined in manager\n            result.Url = _storefrontOptions.StoreUrls[result.Id] ?? result.Url;\n\n            //theme name defined in storefront app options has a higher prioirty over one defined in admin\n            result.ThemeName = !string.IsNullOrEmpty(_storefrontOptions.DefaultTheme)\n                ? _storefrontOptions.DefaultTheme\n                : result.ThemeName;\n\n            return Task.FromResult(result);\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/Stores/StoreWorkContextBuilderExtensions.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Encodings.Web;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.DependencyInjection;\nusing VirtoCommerce.Storefront.Infrastructure.Exceptions;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public static class StoreWorkContextBuilderExtensions\n    {\n        public static Task WithStoresAsync(this IWorkContextBuilder builder, IEnumerable<Store> stores, string defaultStoreId)\n        {\n            if (stores == null)\n            {\n                throw new NoStoresException();\n            }\n\n            builder.WorkContext.AllStores = stores.ToArray();\n            var currentStore = builder.HttpContext.GetCurrentStore(stores, defaultStoreId);\n\n            currentStore.ThemeName = builder.WorkContext.QueryString[\"previewtheme\"] ?? currentStore.ThemeName;\n\n            //Very important workaround. If left  Null or Empty as Url for default store with condition of multiple stores present, will be generated a relative url '/store_name/' instead of\n            // '/' thats can  leads to invalid urls to default store and other issue with  <base href=\"\"> that contains invalid relative  url\n            if (defaultStoreId != null && string.IsNullOrEmpty(currentStore.Url) && currentStore.Id.EqualsInvariant(defaultStoreId))\n            {\n                currentStore.Url = \"/\";\n            }\n            builder.WorkContext.CurrentStore = currentStore;\n            builder.WorkContext.CurrentLanguage = builder.HttpContext.GetCurrentLanguage(builder.WorkContext.CurrentStore);\n\n            // SEO for category, product and blogs is set inside corresponding controllers\n            // there we default SEO for requested store \n            var seoInfo = builder.WorkContext.CurrentStore.SeoInfos?.FirstOrDefault(x => x.Language == builder.WorkContext.CurrentLanguage);\n            if (seoInfo != null && builder.WorkContext.RequestUrl != null)\n            {\n                var htmlEncoder = builder.HttpContext.RequestServices.GetRequiredService<HtmlEncoder>();\n                seoInfo.Slug = htmlEncoder.Encode(builder.WorkContext.RequestUrl.ToString());\n                builder.WorkContext.CurrentPageSeo = seoInfo;\n            }\n            return Task.CompletedTask;\n        }\n\n        public static async Task WithStoresAsync(this IWorkContextBuilder builder, string defaultStoreId)\n        {\n            var serviceProvider = builder.HttpContext.RequestServices;\n            var storeService = serviceProvider.GetRequiredService<IStoreService>();\n\n            var stores = await storeService.GetAllStoresAsync();\n\n            if (stores.IsNullOrEmpty())\n            {\n                throw new NoStoresException();\n            }\n\n            await builder.WithStoresAsync(stores, defaultStoreId);\n        }\n\n        public static Task WithCurrenciesAsync(this IWorkContextBuilder builder, IList<Currency> availCurrencies, Store store)\n        {\n            if (availCurrencies == null)\n            {\n                throw new ArgumentNullException(nameof(availCurrencies));\n            }\n            //Filter all avail currencies, leave only currencies define for store \n            var storeCurrencies = availCurrencies.Where(x => store.CurrenciesCodes.Any(y => x.Equals(y))).ToList();\n            builder.WorkContext.AllCurrencies = storeCurrencies;\n            builder.WorkContext.CurrentCurrency = builder.HttpContext.GetCurrentCurrency(availCurrencies, store);\n            return Task.CompletedTask;\n        }\n\n        public static Task WithCurrenciesAsync(this IWorkContextBuilder builder, Language language, Store store)\n        {\n            if (language == null)\n            {\n                throw new ArgumentNullException(nameof(language));\n            }\n\n            return WithCurrenciesInternalAsync(builder, language, store);\n        }\n\n        private static async Task WithCurrenciesInternalAsync(this IWorkContextBuilder builder, Language language, Store store)\n        {\n            var serviceProvider = builder.HttpContext.RequestServices;\n            var currencyService = serviceProvider.GetRequiredService<ICurrencyService>();\n\n            var currencies = await currencyService.GetAllCurrenciesAsync(language);\n\n            await builder.WithCurrenciesAsync(currencies, store);\n        }\n    }\n}\n\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/WorkContextAccessor.cs",
    "content": "using Microsoft.AspNetCore.Http;\nusing VirtoCommerce.Storefront.Model;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public class WorkContextAccessor : IWorkContextAccessor\n    {\n        private readonly IHttpContextAccessor _httpContextAccessor;\n\n        public WorkContextAccessor(IHttpContextAccessor httpContextAccessor)\n        {\n            _httpContextAccessor = httpContextAccessor;\n        }\n\n        public WorkContext WorkContext\n        {\n            get\n            {\n                return _httpContextAccessor.HttpContext?.Items[\"WorkContext\"] as WorkContext;\n            }\n            set\n            {\n                _httpContextAccessor.HttpContext.Items[\"WorkContext\"] = value;\n            }\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Domain/WorkContextBuilder.cs",
    "content": "using System.Linq;\nusing Microsoft.ApplicationInsights.AspNetCore.Extensions;\nusing Microsoft.AspNetCore.Http;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Domain\n{\n    public partial class WorkContextBuilder : IWorkContextBuilder\n    {\n        public WorkContextBuilder(HttpContext httpContext, StorefrontOptions options)\n        {\n            HttpContext = httpContext;\n\n            var qs = HttpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value.ToString()).WithDefaultValue(null);\n\n            WorkContext = new WorkContext\n            {\n                RequestUrl = HttpContext.Request.GetUri(),\n                QueryString = qs,\n                PageNumber = qs[\"page\"].ToNullableInt() ?? 1,\n            };\n\n            var pageSize = qs[\"count\"].ToNullableInt() ?? qs[\"page_size\"].ToNullableInt();\n            if (pageSize != null && pageSize.Value > options.PageSizeMaxValue)\n            {\n                pageSize = options.PageSizeMaxValue;\n            }\n            WorkContext.PageSize = pageSize ?? 20;\n            //To interpret as true the value of preview_mode from the query string according to its actual presence, since another value of this parameter can be passed.\n            WorkContext.IsPreviewMode =\n                !string.IsNullOrEmpty(WorkContext.QueryString[\"preview_mode\"])\n                || httpContext.Request.Headers[\"x-template-builder\"] == \"preview-mode\";\n\n        }\n\n        public HttpContext HttpContext { get; }\n        public WorkContext WorkContext { get; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Extensions/ClaimsPrincipalExtensions.cs",
    "content": "using System.Security.Claims;\n\nnamespace VirtoCommerce.Storefront.Extensions\n{\n    public static class ClaimsPrincipalExtensions\n    {\n        public static string FindFirstValue(this ClaimsPrincipal principal, string[] claimTypes, string defaultValue)\n        {\n            foreach (var claimType in claimTypes)\n            {\n                var result = principal.FindFirstValue(claimType);\n                if (!string.IsNullOrEmpty(result))\n                    return result;\n            }\n\n            return defaultValue;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Extensions/HostingEnviromentExtension.cs",
    "content": "using System.IO;\nusing Microsoft.AspNetCore.Hosting;\n\nnamespace VirtoCommerce.Storefront.Extensions\n{\n    public static class HostingEnviromentExtension\n    {\n        public static string MapPath(this IWebHostEnvironment hostEnv, string path)\n        {\n            var result = hostEnv.WebRootPath;\n\n            if (path.StartsWith(\"~/\"))\n            {\n                result = System.IO.Path.Combine(result, path.Replace(\"~/\", string.Empty));\n            }\n            else if (Path.IsPathRooted(path))\n            {\n                result = path;\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Extensions/ObjectExtensions.cs",
    "content": "using Newtonsoft.Json.Linq;\n\nnamespace VirtoCommerce.Storefront.Common\n{\n    public static class ObjectExtensions\n    {\n        public static T JsonClone<T>(this T source)\n        {\n            var jObject = JObject.FromObject(source);\n            var result = jObject.ToObject<T>();\n            return result;\n        }\n\n        public static T JsonConvert<T>(this object source)\n        {\n            var jObject = JObject.FromObject(source);\n            var result = jObject.ToObject<T>();\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Extensions/PathStringExtensions.cs",
    "content": "using System;\nusing System.Text.RegularExpressions;\nusing Microsoft.AspNetCore.Http;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Extensions\n{\n    public static class PathStringExtensions\n    {\n\n        const string FILE_SCHEME = \"file\";\n\n        private static string _storeLangeExpr = @\"^/\\b\\S+\\b/[a-zA-Z]{2}/\";\n        public static PathString GetStoreAndLangSegment(this PathString path)\n        {\n            var matches = Regex.Match(path, _storeLangeExpr);\n            return matches.Success ? matches.Value : \"/\";\n        }\n\n        public static bool IsApi(this PathString path)\n        {\n            return path.ToString().Contains(\"/storefrontapi/\");\n        }\n\n        public static PathString TrimStoreAndLangSegment(this PathString path, Store store, Language language)\n        {\n            if (store == null)\n            {\n                throw new ArgumentNullException(nameof(store));\n            }\n            if (language == null)\n            {\n                throw new ArgumentNullException(nameof(language));\n            }\n\n            //need to remove store and language if it already exist in path           \n            path = Regex.Replace(path, @\"^/\\b\" + store.Id + @\"\\b/\", \"/\", RegexOptions.IgnoreCase);\n            path = Regex.Replace(path, @\"/\\b\" + language.CultureName + @\"\\b/\", \"/\", RegexOptions.IgnoreCase);\n            return path;\n        }\n\n        public static PathString AddStoreAndLangSegment(this PathString path, Store store, Language language)\n        {\n            if (store == null)\n            {\n                throw new ArgumentNullException(nameof(store));\n            }\n            if (language == null)\n            {\n                throw new ArgumentNullException(nameof(language));\n            }\n\n            var result = new PathString();\n\n            //add store to path\n            result = result.Add(new PathString(\"/\" + store.Id));\n            //add language to path\n            result = result.Add(new PathString(\"/\" + language.CultureName));\n\n            //need to remove store and language if it already exist in the path\n            result = result.Add(new PathString(path.TrimStoreAndLangSegment(store, language)));\n\n            return result;\n        }\n\n        /// <summary>\n        /// Trims first occurrence of store path (\"/store\" for \"http://localhost/store\") from the beginning of the url. Does nothing in case of empty store.Url.\n        /// </summary>\n        /// <param name=\"path\">Path to trim store path from.</param>\n        /// <param name=\"store\">Store which path to trim.</param>\n        /// <returns></returns>\n        public static PathString TrimStorePath(this PathString path, Store store)\n        {\n            if (store == null)\n            {\n                throw new ArgumentNullException(nameof(store));\n            }\n\n            // Need to remove store path only if store has URL\n            var storeUrl = !string.IsNullOrWhiteSpace(store.Url) ? store.Url : store.SecureUrl;\n\n            if (!string.IsNullOrWhiteSpace(storeUrl) && (Uri.TryCreate(storeUrl, UriKind.Absolute, out var storeUri) && storeUri.Scheme != FILE_SCHEME))\n            {\n                var storeUriPath = storeUri.AbsolutePath.Trim('/');\n\n                // Uri.AbsolutePath by default is \"/\" - no need to trim it\n                if (!string.IsNullOrWhiteSpace(storeUriPath) && !storeUriPath.Equals(\"/\"))\n                {\n                    // Removing store url path from the beginning of path\n                    path = Regex.Replace(path, @\"^/\\b\" + storeUriPath + @\"\\b/\", \"/\", RegexOptions.IgnoreCase);\n                }\n            }\n\n            return path;\n        }\n\n        public static PathString ToAbsolutePath(this string path)\n        {\n            // Checks whether path is absolute path (starts with scheme), and extract local path if it is\n            if (Uri.TryCreate(path, UriKind.Absolute, out var absoluteUri) && absoluteUri.Scheme != FILE_SCHEME)\n            {\n                return absoluteUri.PathAndQuery;\n            }\n\n            return path;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Extensions/QueryCollectionExtensions.cs",
    "content": "using System;\nusing System.Collections.Specialized;\nusing Microsoft.AspNetCore.Http;\n\nnamespace VirtoCommerce.Storefront.Extensions\n{\n    public static class QueryCollectionExtensions\n    {\n        public static NameValueCollection ToNameValueCollection(this IQueryCollection queryCollection)\n        {\n            if (queryCollection == null)\n            {\n                throw new ArgumentNullException(nameof(queryCollection));\n            }\n            var result = new NameValueCollection();\n            foreach (var pair in queryCollection)\n            {\n                result.Add(pair.Key, pair.Value);\n            }\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Extensions/SeoExtensions.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\nusing VirtoCommerce.Storefront.Domain;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Stores;\nusing VirtoCommerce.Tools;\nusing catalogDto = VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi.Models;\nusing coreDto = VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi.Models;\nusing toolsDto = VirtoCommerce.Tools.Models;\n\nnamespace VirtoCommerce.Storefront.Common\n{\n    public static class SeoExtensions\n    {\n        /// <summary>\n        /// Returns SEO path if all outline items of the first outline have SEO keywords, otherwise returns default value.\n        /// Path: GrandParentCategory/ParentCategory/ProductCategory/Product\n        /// </summary>\n        /// <param name=\"outlines\"></param>\n        /// <param name=\"store\"></param>\n        /// <param name=\"language\"></param>\n        /// <param name=\"defaultValue\"></param>\n        /// <returns></returns>\n        public static string GetSeoPath(this IEnumerable<catalogDto.Outline> outlines, Store store, Language language, string defaultValue)\n        {\n            return outlines\n                ?.Select(o => o.JsonConvert<toolsDto.Outline>())\n                .GetSeoPath(store.ToToolsStore(), language.CultureName, defaultValue);\n        }\n\n        /// <summary>\n        /// Returns SEO records with highest score\n        /// http://docs.virtocommerce.com/display/vc2devguide/SEO\n        /// </summary>\n        /// <param name=\"seoRecords\"></param>\n        /// <param name=\"store\"></param>\n        /// <param name=\"language\"></param>\n        /// <param name=\"slug\"></param>\n        /// <returns></returns>\n        public static IList<coreDto.SeoInfo> GetBestMatchingSeoInfos(this IEnumerable<coreDto.SeoInfo> seoRecords, Store store, Language language, string slug = null)\n        {\n            return seoRecords\n                ?.Select(s => s.JsonConvert<toolsDto.SeoInfo>())\n                .GetBestMatchingSeoInfos(store.Id, store.DefaultLanguage.CultureName, language.CultureName, slug)\n                .Select(s => s.JsonConvert<coreDto.SeoInfo>())\n                .ToList();\n        }\n\n        /// <summary>\n        /// Returns SEO records with highest score\n        /// http://docs.virtocommerce.com/display/vc2devguide/SEO\n        /// </summary>\n        /// <param name=\"seoRecords\"></param>\n        /// <param name=\"store\"></param>\n        /// <param name=\"currentCulture\"></param>\n        /// <param name=\"slug\"></param>\n        /// <returns></returns>\n        public static IList<coreDto.SeoInfo> GetBestMatchingSeoInfos(this IEnumerable<coreDto.SeoInfo> seoRecords, Store store, string currentCulture, string slug = null)\n        {\n            return seoRecords\n                ?.Select(s => s.JsonConvert<toolsDto.SeoInfo>())\n                .GetBestMatchingSeoInfos(store.Id, store.DefaultLanguage.CultureName, currentCulture, slug)\n                .Select(s => s.JsonConvert<coreDto.SeoInfo>())\n                .ToList();\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Filters/AngularAntiforgeryCookieResultFilterAttribute.cs",
    "content": "using Microsoft.AspNetCore.Antiforgery;\nusing Microsoft.AspNetCore.Diagnostics;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.AspNetCore.Mvc;\nusing Microsoft.AspNetCore.Mvc.Filters;\n\nnamespace VirtoCommerce.Storefront.Filters\n{\n    /// <summary>\n    ///  Angular will be using their $http service for sending AJAX requests and will automatically include a header with the name X-XSRF-TOKEN\n    ///  if it can find the token value as a cookie with the name XSRF-TOKEN.\n    ///  This filter automatically set XSRF-TOKEN cookies for each request routed to the view\n    /// </summary>\n    public class AngularAntiforgeryCookieResultFilterAttribute : ResultFilterAttribute\n    {\n        private readonly IAntiforgery antiforgery;\n        public AngularAntiforgeryCookieResultFilterAttribute(IAntiforgery antiforgery)\n        {\n            this.antiforgery = antiforgery;\n        }\n\n        public override void OnResultExecuting(ResultExecutingContext context)\n        {\n\n            var statusCodeReExecuteFeature = context.HttpContext.Features.Get<IStatusCodeReExecuteFeature>();\n            //Reissue antiforgery cookies for follow cases:\n            //- when is requested only an ASP.NET View. Since set cookies for each requests such Assets or file resources can leads to stop working the output cache middleware for that controllers\n            //- when there are no errors or inner status codes ReExecute occurs (404, 500 etc) (IStatusCodeReExecuteFeature is presents). Since this can leads for reissue an antiforgery cookies .AspNetCore.Antiforgery without AspNetCore.Identity.Application\n            //that can leads for 400 errors for antiforgery validation due to different User in the  antiforgery tokens are received as  cookies and request headers\n            if (context.Result is ViewResult viewResult && statusCodeReExecuteFeature == null)\n            {\n                var tokens = antiforgery.GetAndStoreTokens(context.HttpContext);\n                //We need to set this Cookies XSRF-TOKEN which can be used on the client's side. The most web frameworks such angular can automatically read this cookie add X-XSRF-TOKEN header to each request.\n                context.HttpContext.Response.Cookies.Append(\"XSRF-TOKEN\", tokens.RequestToken, new CookieOptions() { HttpOnly = false, IsEssential = true, SameSite = SameSiteMode.Lax });\n            }\n        }\n\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Filters/AnonymousUserForStoreAuthorizationFilter.cs",
    "content": "using System;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authorization;\nusing Microsoft.AspNetCore.Authorization.Policy;\nusing Microsoft.AspNetCore.Diagnostics;\nusing Microsoft.AspNetCore.Mvc;\nusing Microsoft.AspNetCore.Mvc.Authorization;\nusing Microsoft.AspNetCore.Mvc.Filters;\nusing Microsoft.Extensions.DependencyInjection;\nusing VirtoCommerce.Storefront.Domain.Security;\n\nnamespace VirtoCommerce.Storefront.Filters\n{\n    /// <summary>\n    /// Authorization filter that redirects all unauthorized users to Login page (deafult AuthorizeFilter could show AccessDenied for non-authorized authenticated users)\n    /// </summary>\n    public class AnonymousUserForStoreAuthorizationFilter : IAsyncAuthorizationFilter\n    {\n        public readonly IAuthorizationPolicyProvider _policyProvider;\n\n        public AnonymousUserForStoreAuthorizationFilter(IAuthorizationPolicyProvider policyProvider)\n        {\n            _policyProvider = policyProvider;\n        }\n\n        public Task OnAuthorizationAsync(AuthorizationFilterContext context)\n        {\n            if (context == null)\n            {\n                throw new ArgumentNullException(nameof(context));\n            }\n\n            return OnAuthorizationInternalAsync(context);\n        }\n\n        protected async Task OnAuthorizationInternalAsync(AuthorizationFilterContext context)\n        {\n            // Don not call filter for  ReExecute requests (such as status code pages) and skips all paths marked as AllowAnonymous attribute\n            if (context.HttpContext.Features.Get<IStatusCodeReExecuteFeature>() != null || context.Filters.Any(x => x is IAllowAnonymousFilter))\n            {\n                return;\n            }\n\n            var policy = await _policyProvider.GetPolicyAsync(AnonymousUserForStoreAuthorizationRequirement.PolicyName);\n            var policyEvaluator = context.HttpContext.RequestServices.GetRequiredService<IPolicyEvaluator>();\n            var authenticateResult = await policyEvaluator.AuthenticateAsync(policy, context.HttpContext);\n            var authorizeResult = await policyEvaluator.AuthorizeAsync(policy, authenticateResult, context.HttpContext, context);\n\n            // For all the results except Succeeded we need to return <see cref=\"ChallengeResult\"/>\n            if (!authorizeResult.Succeeded)\n            {\n                // Here we need only ChallengeResult to redirect to Login instead of ForbiddenResult that standard AuthorizeFilter returns in that case (authenticated and non authorized user)\n                // https://github.com/aspnet/AspNetCore/blob/v2.2.3/src/Mvc/Mvc.Core/src/Authorization/AuthorizeFilter.cs#L210\n                // https://github.com/aspnet/AspNetCore/blob/v2.2.3/src/Security/Authorization/Policy/src/PolicyEvaluator.cs#L91\n                context.Result = new ChallengeResult(policy.AuthenticationSchemes.ToArray());\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/IISUrlRewrite.xml",
    "content": "<rewrite>\n    <rewriteMaps>\n        <!--  Write maps here -->\n    </rewriteMaps>\n    <rules>\n        <!--  Write rules here -->\n    </rules>\n</rewrite>\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/ApiAuthMode.cs",
    "content": "namespace VirtoCommerce.Storefront.Infrastructure\n{\n    public enum ApiAuthMode\n    {\n        /// <summary>\n        ///  Barrier token by using AppId and SecretKey\n        /// </summary>\n        BarrierToken,\n        /// <summary>\n        /// OAuth2 resource owner password credentials  grand flow (username, password)\n        /// </summary>\n        OAuthPassword\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/ApiChangesWatcher.cs",
    "content": "using Microsoft.Extensions.Options;\nusing Microsoft.Extensions.Primitives;\nusing VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi;\n\nnamespace VirtoCommerce.Storefront.Infrastructure\n{\n    public class ApiChangesWatcher : IApiChangesWatcher\n    {\n        private readonly IChangeLog _cacheApi;\n        private readonly StorefrontOptions _options;\n\n        public ApiChangesWatcher(IChangeLog cacheApi, IOptions<StorefrontOptions> options)\n        {\n            _cacheApi = cacheApi;\n            _options = options.Value;\n        }\n\n        public IChangeToken CreateChangeToken()\n        {\n            return new PollingApiChangeToken(_cacheApi, _options.ChangesPollingInterval);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/ApplicationInsights/ServiceCollectionExtension.cs",
    "content": "using Microsoft.ApplicationInsights.AspNetCore;\nusing Microsoft.ApplicationInsights.Extensibility;\nusing Microsoft.ApplicationInsights.SnapshotCollector;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.DependencyInjection;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.ApplicationInsights\n{\n    public static class ServiceCollectionExtension\n    {\n        public static void AddApplicationInsightsExtensions(this IServiceCollection services, IConfiguration configuration)\n        {\n            services.AddSingleton<ITelemetryInitializer, UserTelemetryInitializer>();\n            services.Configure<SnapshotCollectorConfiguration>(configuration.GetSection(nameof(SnapshotCollectorConfiguration)));\n            services.AddSingleton<ITelemetryProcessorFactory>(sp => new SnapshotCollectorTelemetryProcessorFactory(sp));\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/ApplicationInsights/SnapshotCollectorTelemetryProcessorFactory.cs",
    "content": "using System;\nusing Microsoft.ApplicationInsights.AspNetCore;\nusing Microsoft.ApplicationInsights.Extensibility;\nusing Microsoft.ApplicationInsights.SnapshotCollector;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Options;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.ApplicationInsights\n{\n    /// <summary>\n    /// https://docs.microsoft.com/en-us/azure/application-insights/app-insights-snapshot-debugger\n    /// </summary>\n    public class SnapshotCollectorTelemetryProcessorFactory : ITelemetryProcessorFactory\n    {\n        private readonly IServiceProvider _serviceProvider;\n        public SnapshotCollectorTelemetryProcessorFactory(IServiceProvider serviceProvider)\n        {\n            _serviceProvider = serviceProvider;\n        }\n\n        public ITelemetryProcessor Create(ITelemetryProcessor nextProcessor)\n        {\n            var snapshotConfigurationOptions = _serviceProvider.GetService<IOptions<SnapshotCollectorConfiguration>>();\n            return new SnapshotCollectorTelemetryProcessor(nextProcessor, configuration: snapshotConfigurationOptions.Value);\n        }\n    }\n}\n\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/ApplicationInsights/UserTelemetryInitializer.cs",
    "content": "using Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers;\nusing Microsoft.ApplicationInsights.Channel;\nusing Microsoft.ApplicationInsights.DataContracts;\nusing Microsoft.AspNetCore.Http;\n\nnamespace VirtoCommerce.Storefront.Infrastructure\n{\n    /// <summary>\n    /// A telemetry initializer that will gather user identity context information.\n    /// </summary>\n    public class UserTelemetryInitializer : TelemetryInitializerBase\n    {\n        public UserTelemetryInitializer(IHttpContextAccessor httpContextAccessor)\n            : base(httpContextAccessor)\n        {\n        }\n\n        // <summary>\n        /// Initializes user id and name for Azure Web App case.\n        /// </summary>\n        /// <param name=\"platformContext\">Platform context.</param>\n        /// <param name=\"requestTelemetry\">Request telemetry.</param>\n        /// <param name=\"telemetry\">Telemetry item.</param>\n        protected override void OnInitializeTelemetry(HttpContext platformContext, RequestTelemetry requestTelemetry, ITelemetry telemetry)\n        {\n            if (platformContext.User != null)\n            {\n                telemetry.Context.User.AuthenticatedUserId = platformContext.User.Identity.Name;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Autorest/ApiKeySecretAuthHandler.cs",
    "content": "using System.Net.Http;\nusing System.Net.Http.Headers;\nusing System.Security.Cryptography;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.Extensions.Options;\nusing VirtoCommerce.Storefront.Model;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Autorest\n{\n    /// <summary>\n    /// HTTP message delegating handler that encapsulates access token handling and renewment\n    /// Implements key-secret authorization to the Platform API \n    /// </summary>\n    public class ApiKeySecretAuthHandler : BaseAuthHandler\n    {\n        private readonly PlatformEndpointOptions _options;\n\n        public ApiKeySecretAuthHandler(IOptions<PlatformEndpointOptions> options, IWorkContextAccessor workContextAccessor, IHttpContextAccessor httpContextAccessor) : base(workContextAccessor, httpContextAccessor)\n        {\n            _options = options.Value;\n        }\n\n        protected override Task AddAuthenticationAsync(HttpRequestMessage request)\n        {\n            if (_options != null)\n            {\n                var signature = new ApiRequestSignature { AppId = _options.AppId };\n\n                var parameters = new[]\n                {\n                    new NameValuePair(null, _options.AppId),\n                    new NameValuePair(null, signature.TimestampString)\n                };\n\n                signature.Hash = HmacUtility.GetHashString(key => new HMACSHA256(key), _options.SecretKey, parameters);\n                request.Headers.Authorization = new AuthenticationHeaderValue(\"HMACSHA256\", signature.ToString());\n            }\n            return Task.CompletedTask;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Autorest/AuthenticationHandlerFactory.cs",
    "content": "using System;\nusing System.Net.Http;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Options;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Autorest\n{\n    public class AuthenticationHandlerFactory\n    {\n        private readonly IServiceProvider _serviceProvider;\n        private readonly IOptions<PlatformEndpointOptions> _platformEndpointOptions;\n\n        public AuthenticationHandlerFactory(IServiceProvider serviceProvider, IOptions<PlatformEndpointOptions> platformEndpointOptions)\n        {\n            _serviceProvider = serviceProvider;\n            _platformEndpointOptions = platformEndpointOptions;\n        }\n\n        public DelegatingHandler CreateAuthHandler()\n        {\n            DelegatingHandler result = null;\n            var options = _platformEndpointOptions.Value;\n            if (!string.IsNullOrEmpty(options.ClientId) && !string.IsNullOrEmpty(options.ClientSecret))\n            {\n                result = _serviceProvider.GetService<ClientCredentialsAuthHandler>();\n            }\n            else if (!string.IsNullOrEmpty(options.UserName) && !string.IsNullOrEmpty(options.Password))\n            {\n                result = _serviceProvider.GetService<UserPasswordAuthHandler>();\n            }\n            else if (!string.IsNullOrEmpty(options.AppId) && !string.IsNullOrEmpty(options.SecretKey))\n            {\n                result = _serviceProvider.GetService<ApiKeySecretAuthHandler>();\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Autorest/BaseAuthHandler.cs",
    "content": "using System.Net.Http;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Http;\nusing VirtoCommerce.Storefront.Model;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Autorest\n{\n    /// <summary>\n    /// Basic implementation of authorization handlers to the Platform API \n    /// </summary>\n    public abstract class BaseAuthHandler : DelegatingHandler\n    {\n        private readonly IWorkContextAccessor _workContextAccessor;\n        private readonly IHttpContextAccessor _httpContextAccessor;\n\n        protected BaseAuthHandler(IWorkContextAccessor workContextAccessor, IHttpContextAccessor httpContextAccessor)\n        {\n            _workContextAccessor = workContextAccessor;\n            _httpContextAccessor = httpContextAccessor;\n        }\n\n        /// <summary>\n        /// Add platform-specific headers and authentification, then call basic SendAsync\n        /// </summary>\n        /// <param name=\"request\"></param>\n        /// <param name=\"cancellationToken\"></param>\n        /// <returns></returns>\n        protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n        {\n            AddCurrentUser(request);\n            AddUserIp(request);\n            await AddAuthenticationAsync(request);\n            return await base.SendAsync(request, cancellationToken).ConfigureAwait(false);\n        }\n\n        /// <summary>\n        /// Add end-user name to the reqiest header\n        /// </summary>\n        /// <param name=\"request\"></param>\n        protected void AddCurrentUser(HttpRequestMessage request)\n        {\n            var worContex = _workContextAccessor.WorkContext;\n            if (worContex != null)\n            {\n                var currentUser = worContex.CurrentUser;\n\n                //Add special header with user name to each API request for future audit and logging\n                if (currentUser != null && currentUser.IsRegisteredUser)\n                {\n                    var userName = currentUser.UserName;\n\n                    if (!string.IsNullOrEmpty(userName))\n                    {\n                        request.Headers.Add(\"VirtoCommerce-User-Name\", userName);\n                    }\n\n                    var operatorUserName = currentUser.OperatorUserName;\n\n                    if (!string.IsNullOrEmpty(operatorUserName))\n                    {\n                        request.Headers.Add(\"VirtoCommerce-Operator-User-Name\", operatorUserName);\n                    }\n                }\n                else\n                {\n                    // Skip Passing of VirtoCommerce-User-Name if Token Authorization is usdde\n                    if (!request.Headers.Contains(\"Authorization\"))\n                    {\n                        request.Headers.Add(\"VirtoCommerce-User-Name\", \"Anonymous\");\n                        request.Headers.Add(\"VirtoCommerce-Anonymous-User-Id\", currentUser?.Id);\n                    }\n                }\n            }\n        }\n\n        /// <summary>\n        /// Add end-user IP to the reqiest header\n        /// </summary>\n        /// <param name=\"request\"></param>\n        protected void AddUserIp(HttpRequestMessage request)\n        {\n            var userIp = _httpContextAccessor.HttpContext?.Connection.RemoteIpAddress.ToString();\n\n            if (!string.IsNullOrEmpty(userIp))\n            {\n                request.Headers.Add(\"True-Client-IP\", userIp);\n            }\n        }\n\n        /// <summary>\n        /// Add authentication details to the request.\n        /// This method should be implemented depending on authorization way\n        /// </summary>\n        /// <param name=\"request\"></param>\n        protected abstract Task AddAuthenticationAsync(HttpRequestMessage request);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Autorest/ClientCredentialsAuthHandler.cs",
    "content": "using System;\nusing System.Net;\nusing System.Net.Http;\nusing System.Net.Http.Headers;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing IdentityModel.Client;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.Extensions.Options;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Autorest\n{\n    /// <summary>\n    /// HTTP message delegating handler that encapsulates access token handling and renewment\n    /// Implements id-secret authorization to the Platform API \n    /// </summary>\n\n    public class ClientCredentialsAuthHandler : BaseAuthHandler\n    {\n        private readonly PlatformEndpointOptions _options;\n        private readonly IHttpClientFactory _clientFactory;\n        private readonly IStorefrontMemoryCache _memoryCache;\n\n        /// <summary>\n        ///  Initializes a new instance of the <see cref=\"ClientCredentialsAuthHandler\"/> class.\n        /// </summary>\n        /// <param name=\"options\"></param>\n        /// <param name=\"clientFactory\"></param>\n        public ClientCredentialsAuthHandler(\n            IStorefrontMemoryCache memoryCache\n            , IOptions<PlatformEndpointOptions> options\n            , IHttpClientFactory clientFactory\n            , IWorkContextAccessor workContextAccessor\n            , IHttpContextAccessor httpContextAccessor) : base(workContextAccessor, httpContextAccessor)\n        {\n            _options = options.Value;\n            _clientFactory = clientFactory;\n            _memoryCache = memoryCache;\n        }\n\n        /// <summary>\n        /// Sends an HTTP request to the inner handler to send to the server as an asynchronous operation.\n        /// </summary>\n        /// <param name=\"request\">The HTTP request message to send to the server.</param>\n        /// <param name=\"cancellationToken\">A cancellation token to cancel operation.</param>\n        /// <returns>\n        /// Returns <see cref=\"T:System.Threading.Tasks.Task`1\" />. The task object representing the asynchronous operation.\n        /// </returns>\n        protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n        {\n            var response = await base.SendAsync(request, cancellationToken);\n\n            if (response.StatusCode != HttpStatusCode.Unauthorized)\n            {\n                return response;\n            }\n\n            return await base.SendAsync(request, cancellationToken);\n        }\n\n        protected override async Task AddAuthenticationAsync(HttpRequestMessage request)\n        {\n            request.Headers.Authorization = new AuthenticationHeaderValue(\"Bearer\", await GetOrRenewTokenAsync());\n        }\n\n        private async Task<string> GetOrRenewTokenAsync()\n        {\n            var cacheKey = CacheKey.With(GetType(), \"token\");\n\n            var token = await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n            {\n                var request = new ClientCredentialsTokenRequest()\n                {\n                    Address = $\"{_options.Url?.ToString().TrimEnd('/')}/connect/token\",\n                    ClientId = _options.ClientId,\n                    ClientSecret = _options.ClientSecret\n                };\n\n                var client = _clientFactory.CreateClient();\n                var response = await client.RequestClientCredentialsTokenAsync(request);\n                if (!response.IsError)\n                {\n                    cacheEntry.AbsoluteExpirationRelativeToNow = TimeSpan.FromSeconds(response.ExpiresIn);\n                    return response.AccessToken;\n                }\n                return null;\n            }, cacheNullValue: false);\n            return token;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Autorest/EmptyServiceClientCredentials.cs",
    "content": "using Microsoft.Rest;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Autorest\n{\n    public class EmptyServiceClientCredentials : ServiceClientCredentials\n    {\n        public EmptyServiceClientCredentials()\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Autorest/UserPasswordAuthHandler.cs",
    "content": "using System;\nusing System.Net;\nusing System.Net.Http;\nusing System.Net.Http.Headers;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing IdentityModel.Client;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.Extensions.Options;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Autorest\n{\n    /// <summary>\n    /// HTTP message delegating handler that encapsulates access token handling and renewment\n    /// Implements user-password authorization to the Platform API \n    /// </summary>\n    public class UserPasswordAuthHandler : BaseAuthHandler\n    {\n        private readonly PlatformEndpointOptions _options;\n        private readonly IHttpClientFactory _clientFactory;\n        private readonly IStorefrontMemoryCache _memoryCache;\n\n        /// <summary>\n        /// Gets or sets the timeout\n        /// </summary>\n        public TimeSpan Timeout { get; set; } = TimeSpan.FromSeconds(5);\n\n        /// <summary>\n        ///  Initializes a new instance of the <see cref=\"UserPasswordAuthHandler\"/> class.\n        /// </summary>\n        /// <param name=\"options\"></param>\n        /// <param name=\"clientFactory\"></param>\n        public UserPasswordAuthHandler(\n            IStorefrontMemoryCache memoryCache\n            , IOptions<PlatformEndpointOptions> options\n            , IHttpClientFactory clientFactory\n            , IWorkContextAccessor workContextAccessor\n            , IHttpContextAccessor httpContextAccessor) : base(workContextAccessor, httpContextAccessor)\n        {\n            _options = options.Value;\n            _clientFactory = clientFactory;\n            _memoryCache = memoryCache;\n        }\n\n        /// <summary>\n        /// Sends an HTTP request to the inner handler to send to the server as an asynchronous operation.\n        /// </summary>\n        /// <param name=\"request\">The HTTP request message to send to the server.</param>\n        /// <param name=\"cancellationToken\">A cancellation token to cancel operation.</param>\n        /// <returns>\n        /// Returns <see cref=\"T:System.Threading.Tasks.Task`1\" />. The task object representing the asynchronous operation.\n        /// </returns>\n        protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n        {\n            var response = await base.SendAsync(request, cancellationToken);\n\n            if (response.StatusCode != HttpStatusCode.Unauthorized)\n            {\n                return response;\n            }\n\n            return await base.SendAsync(request, cancellationToken);\n        }\n\n        protected override async Task AddAuthenticationAsync(HttpRequestMessage request)\n        {\n            if (!request.Headers.Contains(\"Authorization\") && !request.RequestUri.AbsoluteUri.EndsWith(\"/token\"))\n            {\n                request.Headers.Authorization = new AuthenticationHeaderValue(\"Bearer\", await GetOrRenewTokenAsync());\n            }\n        }\n\n        private async Task<string> GetOrRenewTokenAsync()\n        {\n            var cacheKey = CacheKey.With(GetType(), \"token\");\n            var token = await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n            {\n                var client = _clientFactory.CreateClient();\n\n                var response = await client.RequestPasswordTokenAsync(new PasswordTokenRequest { Address = $\"{_options.Url?.ToString().TrimEnd('/')}/connect/token\", UserName = _options.UserName, Password = _options.Password });\n                if (!response.IsError)\n                {\n                    cacheEntry.AbsoluteExpirationRelativeToNow = TimeSpan.FromSeconds(response.ExpiresIn);\n                    return response.AccessToken;\n                }\n                return null;\n            }, cacheNullValue: false);\n            return token;\n        }\n\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/BlobChangeToken.cs",
    "content": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.Primitives;\nusing Microsoft.WindowsAzure.Storage;\nusing Microsoft.WindowsAzure.Storage.Blob;\nusing VirtoCommerce.Storefront.Domain;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Infrastructure\n{\n    /// <summary>\n    /// Based on PollingFileChangeToken \n    /// </summary>\n    public class BlobChangeToken : IChangeToken\n    {\n        private static ConcurrentDictionary<string, DateTime> _previousChangeTimeUtcTokenLookup = new ConcurrentDictionary<string, DateTime>(StringComparer.OrdinalIgnoreCase);\n\n        public string BlobName { get; set; }\n        private bool _hasChanged;\n        private readonly CloudBlobContainer _container;\n        private readonly AzureBlobContentOptions _options;\n        private DateTime _lastModifiedUtc;\n        private DateTime _prevModifiedUtc;\n        private static DateTime _lastCheckedTimeUtcStatic;\n        private static readonly object _lock = new object();\n\n        public BlobChangeToken(string blobName, CloudBlobContainer container, AzureBlobContentOptions options)\n        {\n            BlobName = blobName;\n\n            _container = container;\n            _options = options;\n\n            _lastModifiedUtc = _prevModifiedUtc = DateTime.UtcNow;\n        }\n\n        private static void UpdateLastCheckedTimeUtcStatic(DateTime currentTime)\n        {\n            _lastCheckedTimeUtcStatic = currentTime;\n        }\n\n        public bool HasChanged\n        {\n            get\n            {\n                //get last modified dt\n                _lastModifiedUtc = GetLastModifiedUtc();\n\n                var hasChanged = _lastModifiedUtc > _prevModifiedUtc;\n                if (hasChanged)\n                {\n                    _prevModifiedUtc = _lastModifiedUtc;\n                    _hasChanged = true;\n                }\n\n                //check polling interval\n                var currentTime = DateTime.UtcNow;\n                if (currentTime - _lastCheckedTimeUtcStatic < _options.ChangesPollingInterval)\n                {\n                    return _hasChanged;\n                }\n\n                lock (_lock)\n                {\n                    currentTime = DateTime.UtcNow;\n                    if (currentTime - _lastCheckedTimeUtcStatic < _options.ChangesPollingInterval)\n                    {\n                        return _hasChanged;\n                    }\n                    UpdateLastCheckedTimeUtcStatic(currentTime);\n                    Task.Run(() =>\n                    {\n                        EvaluateBlobsModifiedDate();\n                    });\n                }\n\n                return _hasChanged;\n            }\n        }\n\n        private DateTime GetLastModifiedUtc()\n        {\n            if (IsRegularFileName(BlobName))\n            {\n                return _previousChangeTimeUtcTokenLookup.GetOrAdd(BlobName, _lastModifiedUtc);\n            }\n            else\n            {\n                var list = _previousChangeTimeUtcTokenLookup.Where(x => WildcardMatch(BlobName, x.Key)).Select(x => x.Value.Ticks);\n                var result = list.Any() ? new DateTime(list.Max()) : _lastModifiedUtc;\n                return result;\n            }\n        }\n\n        private static bool WildcardMatch(string wildcard, string filename)\n        {\n            // it's a simplest realization for case when wildcard ends with **/*\n            var path = wildcard.Split('*')[0];\n            return filename.StartsWith(path, StringComparison.InvariantCultureIgnoreCase);\n        }\n\n        private bool IsRegularFileName(string pattern)\n        {\n            return !new[] { '?', '*' }.Any(pattern.Contains);\n        }\n\n        private void EvaluateBlobsModifiedDate(CancellationToken cancellationToken = default(CancellationToken))\n        {\n            var files = ListBlobs().GetAwaiter().GetResult();\n            foreach (var file in files)\n            {\n                if (cancellationToken.IsCancellationRequested)\n                {\n                    break;\n                }\n\n                var lastModifiedUtc = file.Properties.LastModified?.UtcDateTime ?? DateTime.UtcNow;\n\n                if (!_previousChangeTimeUtcTokenLookup.TryGetValue(file.Name, out var dt))\n                {\n                    _previousChangeTimeUtcTokenLookup.GetOrAdd(file.Name, lastModifiedUtc);\n                }\n                else\n                {\n                    _previousChangeTimeUtcTokenLookup[file.Name] = lastModifiedUtc;\n                }\n            }\n        }\n\n        private async Task<IEnumerable<CloudBlob>> ListBlobs()\n        {\n            var blobItems = new List<IListBlobItem>();\n            BlobContinuationToken token = null;\n            var operationContext = new OperationContext();\n            do\n            {\n                var resultSegment = await _container.ListBlobsSegmentedAsync(null, true, BlobListingDetails.Metadata, null, token, _options.BlobRequestOptions, operationContext);\n                token = resultSegment.ContinuationToken;\n                blobItems.AddRange(resultSegment.Results);\n            } while (token != null);\n\n            var result = blobItems.OfType<CloudBlob>().ToList();\n            return result;\n        }\n\n        /// <summary>\n        /// Don't know what to do with this one, so false\n        /// </summary>\n        public bool ActiveChangeCallbacks => false;\n\n        /// <summary>\n        /// Don't know  what to do with this either\n        /// </summary>\n        public IDisposable RegisterChangeCallback(Action<object> callback, object state) => EmptyDisposable.Instance;\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/BlobChangesWatcher.cs",
    "content": "using System.Threading;\nusing Microsoft.Extensions.Options;\nusing Microsoft.Extensions.Primitives;\nusing Microsoft.WindowsAzure.Storage;\nusing Microsoft.WindowsAzure.Storage.Blob;\nusing VirtoCommerce.Storefront.Domain;\n\nnamespace VirtoCommerce.Storefront.Infrastructure\n{\n    public class BlobChangesWatcher : IBlobChangesWatcher\n    {\n        private readonly AzureBlobContentOptions _options;\n        private readonly CloudBlobContainer _container;\n\n        public BlobChangesWatcher(IOptions<AzureBlobContentOptions> options)\n        {\n            _options = options.Value;\n\n            if (CloudStorageAccount.TryParse(_options.ConnectionString, out CloudStorageAccount cloudStorageAccount))\n            {\n                var cloudBlobClient = cloudStorageAccount.CreateCloudBlobClient();\n                _container = cloudBlobClient.GetContainerReference(_options.Container);\n            }\n        }\n\n        public IChangeToken CreateBlobChangeToken(string path)\n        {\n            if (!_options.PollForChanges || _container == null)\n            {\n                return new CancellationChangeToken(new CancellationToken());\n            }\n\n            return new BlobChangeToken(path, _container, _options);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Exceptions/NoStoresException.cs",
    "content": "using System;\nusing System.Runtime.Serialization;\nusing VirtoCommerce.Storefront.Model.Common.Exceptions;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Exceptions\n{\n    [Serializable]\n    public class NoStoresException : StorefrontException\n    {\n        [Obsolete(DiagnosticId = \"SYSLIB0051\")]\n        protected NoStoresException(SerializationInfo info, StreamingContext context) : base(info, context)\n        {\n        }\n\n        public NoStoresException() : base(\"No stores defined\", \"NoStore\")\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Exceptions/NoThemeException.cs",
    "content": "using System;\nusing System.Runtime.Serialization;\nusing VirtoCommerce.Storefront.Model.Common.Exceptions;\n\nnamespace VirtoCommerce.Storefront.Infrastructure\n{\n    [Serializable]\n    public class NoThemeException : StorefrontException\n    {\n        [Obsolete(DiagnosticId = \"SYSLIB0051\")]\n        protected NoThemeException(SerializationInfo info, StreamingContext context) : base(info, context)\n        {\n\n        }\n        public NoThemeException() : base(\"No theme defined\", \"NoTheme\")\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/HealthCheck/PlatformConnectionHealthChecker.cs",
    "content": "using System.Threading;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.Diagnostics.HealthChecks;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.HealthCheck\n{\n    public class PlatformConnectionHealthChecker : IHealthCheck\n    {\n        private readonly IStoreService _storeService;\n\n        public PlatformConnectionHealthChecker(IStoreService storeService)\n        {\n            _storeService = storeService;\n        }\n\n        public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)\n        {\n            try\n            {\n                await _storeService.GetAllStoresAsync();\n                return HealthCheckResult.Healthy(\"Connection to the Platform is OK\");\n            }\n            catch\n            {\n                return HealthCheckResult.Unhealthy(\"Connection to the Platform fails\");\n            }\n\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/HmacUtility.cs",
    "content": "using System;\nusing System.Globalization;\nusing System.Linq;\nusing System.Security.Cryptography;\nusing System.Text;\n\nnamespace VirtoCommerce.Storefront.Infrastructure\n{\n    public static class HmacUtility\n    {\n        public const string NameValueSeparator = \"=\";\n        public const string ParameterSeparator = \"&\";\n\n        public static string ComputeHash(Func<byte[], HMAC> hmacFactory, string secretKey, string data)\n        {\n            var dataBytes = Encoding.UTF8.GetBytes(data);\n            var keyBytes = ConvertHexStringToBytes(secretKey);\n            return ComputeHash(hmacFactory, keyBytes, dataBytes);\n        }\n\n        public static string ComputeHash(Func<byte[], HMAC> hmacFactory, byte[] secretKey, byte[] data)\n        {\n            if (data == null)\n            {\n                throw new ArgumentNullException(\"data\");\n            }\n\n            using (var hmac = hmacFactory(secretKey))\n            {\n                var hash = hmac.ComputeHash(data, 0, data.Length);\n                return ConvertBytesToHexString(hash);\n            }\n        }\n\n        public static string GetHashString(Func<byte[], HMAC> hmacFactory, string secretKey, NameValuePair[] parameters)\n        {\n            var data = BuildDataString(parameters);\n            return ComputeHash(hmacFactory, secretKey, data);\n        }\n\n\n        private static string BuildDataString(NameValuePair[] parameters)\n        {\n            if (parameters == null)\n            {\n                throw new ArgumentNullException(\"parameters\");\n            }\n\n            var builder = new StringBuilder();\n\n            var orderedParameters =\n                parameters.Where(p => string.IsNullOrEmpty(p.Name) && !string.IsNullOrEmpty(p.Value))\n                    .Union(\n                        parameters.Where(p => !string.IsNullOrEmpty(p.Name) && !string.IsNullOrEmpty(p.Value))\n                            .OrderBy(i => i.Name))\n                    .ToList();\n\n            foreach (var parameter in orderedParameters)\n            {\n                if (builder.Length > 0)\n                {\n                    builder.Append(ParameterSeparator);\n                }\n\n                if (!string.IsNullOrEmpty(parameter.Name))\n                {\n                    builder.Append(parameter.Name);\n                    builder.Append(NameValueSeparator);\n                }\n\n                builder.Append(parameter.Value);\n            }\n\n            var data = builder.ToString();\n            return data;\n        }\n\n        private static string ConvertBytesToHexString(byte[] bytes)\n        {\n            var builder = new StringBuilder();\n\n            foreach (var b in bytes)\n            {\n                builder.Append(b.ToString(\"x2\", CultureInfo.InvariantCulture));\n            }\n\n            return builder.ToString();\n        }\n\n        private static byte[] ConvertHexStringToBytes(string hexString)\n        {\n            return\n                Enumerable.Range(0, hexString.Length)\n                    .Where(i => i % 2 == 0)\n                    .Select(i => Convert.ToByte(hexString.Substring(i, 2), 16))\n                    .ToArray();\n        }\n    }\n\n    public class NameValuePair\n    {\n        public string Name { get; private set; }\n        public string Value { get; private set; }\n\n        public NameValuePair(string name, string value)\n        {\n            Name = name;\n            Value = value;\n        }\n\n        public override string ToString()\n        {\n            var builder = new StringBuilder();\n            builder.Append(\"[\");\n            builder.Append(Name);\n            builder.Append(\", \");\n            builder.Append(Value);\n            builder.Append(\"]\");\n            return builder.ToString();\n        }\n    }\n\n    public class ApiRequestSignature\n    {\n        public string AppId { get; set; }\n        public string Hash { get; set; }\n        public DateTime Timestamp { get; private set; }\n        public string TimestampString { get; private set; }\n\n        public ApiRequestSignature()\n        {\n            Timestamp = DateTime.UtcNow;\n            TimestampString = Timestamp.ToString(\"o\", CultureInfo.InvariantCulture);\n        }\n\n        public static bool TryParse(string input, out ApiRequestSignature parsedValue)\n        {\n            parsedValue = null;\n\n            if (input == null)\n            {\n                return false;\n            }\n\n            var parts = input.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);\n\n            if (parts.Length != 3 || parts[2].Length != 64 || !DateTime.TryParseExact(\n                parts[1],\n                \"o\",\n                CultureInfo.InvariantCulture,\n                DateTimeStyles.AdjustToUniversal,\n                out var timestamp))\n            {\n                return false;\n            }\n\n            parsedValue = new ApiRequestSignature\n            {\n                AppId = parts[0],\n                TimestampString = parts[1],\n                Hash = parts[2],\n                Timestamp = timestamp,\n            };\n\n            return true;\n        }\n\n        public override string ToString()\n        {\n            return string.Join(\";\", AppId, TimestampString, Hash);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/IApiChangesWatcher.cs",
    "content": "using Microsoft.Extensions.Primitives;\n\nnamespace VirtoCommerce.Storefront.Infrastructure\n{\n    public interface IApiChangesWatcher\n    {\n        IChangeToken CreateChangeToken();\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/IBlobChangesWatcher.cs",
    "content": "using Microsoft.Extensions.Primitives;\n\nnamespace VirtoCommerce.Storefront.Infrastructure\n{\n    public interface IBlobChangesWatcher\n    {\n        IChangeToken CreateBlobChangeToken(string path);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/PlatformEndpointOptions.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Infrastructure\n{\n    public class PlatformEndpointOptions\n    {\n        public ApiAuthMode AuthMode { get; set; } = ApiAuthMode.BarrierToken;\n        public Uri Url { get; set; }\n\n        /// <summary>\n        /// Credentials used for ApiAuthMode.BarrierToken mode\n        /// </summary>\n        public string AppId { get; set; }\n        public string SecretKey { get; set; }\n\n        /// <summary>\n        /// Client credentials used for client credential flow\n        /// </summary>\n        public string ClientId { get; set; }\n        public string ClientSecret { get; set; }\n\n        /// <summary>\n        /// Credentials used for ApiAuthMode.OAuthPassword mode\n        /// </summary>\n        public string UserName { get; set; }\n        public string Password { get; set; }\n\n        public TimeSpan RequestTimeout { get; set; } = TimeSpan.FromSeconds(30);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/PollingApiChangeToken.cs",
    "content": "using System;\nusing System.Threading;\nusing Microsoft.Extensions.Primitives;\nusing VirtoCommerce.Storefront.AutoRestClients.PlatformModuleApi;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Infrastructure\n{\n    public class PollingApiChangeToken : IChangeToken\n    {\n        private readonly IChangeLog _cacheApi;\n        private static DateTime _previousChangeTimeUtcStatic;\n        private static DateTime _lastCheckedTimeUtcStatic;\n        private readonly DateTime _previousChangeTimeUtc;\n        private readonly TimeSpan _pollingInterval;\n        private static readonly object _lock = new object();\n\n        public PollingApiChangeToken(IChangeLog cacheApi, TimeSpan pollingInterval)\n        {\n            _pollingInterval = pollingInterval;\n            _cacheApi = cacheApi;\n            _previousChangeTimeUtc = _previousChangeTimeUtcStatic;\n        }\n\n        public static void UpdatePreviousChangeTimeUtcStatic(DateTime currentTime)\n        {\n            _previousChangeTimeUtcStatic = currentTime;\n        }\n\n        public static void UpdateLastCheckedTimeUtcStatic(DateTime currentTime)\n        {\n            _lastCheckedTimeUtcStatic = currentTime;\n        }\n\n        private DateTime GetLastChangeTimeUtc()\n        {\n            return _cacheApi.GetLastModifiedDate().LastModifiedDate ?? default(DateTime);\n        }\n\n        /// <summary>\n        /// Always false.\n        /// </summary>\n        public bool ActiveChangeCallbacks => false;\n\n        public bool HasChanged\n        {\n            get\n            {\n                var hasChanged = _previousChangeTimeUtc < _previousChangeTimeUtcStatic;\n\n                var currentTime = DateTime.UtcNow;\n                if (currentTime - _lastCheckedTimeUtcStatic < _pollingInterval)\n                {\n                    return hasChanged;\n                }\n\n                //Need to prevent API flood for multiple token instances\n                var lockTaken = Monitor.TryEnter(_lock);\n\n                try\n                {\n                    if (lockTaken)\n                    {\n                        var lastChangeTimeUtc = GetLastChangeTimeUtc();\n                        if (_previousChangeTimeUtcStatic < lastChangeTimeUtc)\n                        {\n                            UpdatePreviousChangeTimeUtcStatic(lastChangeTimeUtc);\n                            hasChanged = true;\n                        }\n\n                        UpdateLastCheckedTimeUtcStatic(currentTime);\n                    }\n                }\n                finally\n                {\n                    if (lockTaken)\n                    {\n                        Monitor.Exit(_lock);\n                    }\n                }\n\n                return hasChanged;\n            }\n        }\n\n        /// <summary>\n        /// Does not actually register callbacks.\n        /// </summary>\n        /// <param name=\"callback\">This parameter is ignored</param>\n        /// <param name=\"state\">This parameter is ignored</param>\n        /// <returns>A disposable object that noops when disposed</returns>\n        public IDisposable RegisterChangeCallback(Action<object> callback, object state) => EmptyDisposable.Instance;\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/RequireHttpsOptions.cs",
    "content": "namespace VirtoCommerce.Storefront.Infrastructure\n{\n    public class RequireHttpsOptions\n    {\n        public bool Enabled { get; set; } = false;\n        public int StatusCode { get; set; } = 308;\n        public string ReasonPhrase { get; set; } = \"Permanent Redirect\";\n        public int Port { get; set; } = 443;\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/StorefrontOptions.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing VirtoCommerce.LiquidThemeEngine;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Infrastructure\n{\n    public class StorefrontOptions\n    {\n        public string DefaultStore { get; set; }\n\n        public string DefaultTheme { get; set; }\n\n        public TimeSpan ChangesPollingInterval { get; set; } = TimeSpan.FromMinutes(1);\n        public PlatformEndpointOptions Endpoint { get; set; }\n        public LiquidThemeEngineOptions LiquidThemeEngine { get; set; }\n        public RequireHttpsOptions RequireHttps { get; set; }\n        public bool SendAccountConfirmation { get; set; } = false;\n        public int WishlistLimit { get; set; }\n\n        //The options contains mapping of urls with concrete stores\n        public IDictionary<string, string> StoreUrls { get; set; } = new Dictionary<string, string>().WithDefaultValue(null);\n\n        public bool CacheEnabled { get; set; }\n\n        public TimeSpan? CacheAbsoluteExpiration { get; set; }\n        public TimeSpan? CacheSlidingExpiration { get; set; }\n\n        public int PageSizeMaxValue { get; set; } = 100;\n\n        public string ResetPasswordNotificationGateway { get; set; } = \"Email\";\n        public string TwoFactorAuthenticationNotificationGateway { get; set; } = \"Phone\";\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/StorefrontUrlBuilder.cs",
    "content": "using System;\nusing System.Linq;\nusing System.Web;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.AspNetCore.Http;\nusing VirtoCommerce.Storefront.Domain;\nusing VirtoCommerce.Storefront.Extensions;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Stores;\nusing VirtoCommerce.Tools;\n\nnamespace VirtoCommerce.Storefront.Infrastructure\n{\n    /// <summary>\n    /// Create storefront url contains language and store information\n    /// </summary>\n    public class StorefrontUrlBuilder : IStorefrontUrlBuilder\n    {\n        private readonly IUrlBuilder _urlBuilder;\n        private readonly IWorkContextAccessor _workContextAccessor;\n        private readonly IWebHostEnvironment _hostEnv;\n        private readonly IHttpContextAccessor _httpContextAccessor;\n\n        private static readonly string[] UrlContainingQueryParameters = { \"ReturnUrl\", };\n\n        public StorefrontUrlBuilder(IUrlBuilder urlBuilder, IWorkContextAccessor workContextAccessor, IWebHostEnvironment hostEnv, IHttpContextAccessor httpContextAccessor)\n        {\n            _urlBuilder = urlBuilder;\n            _workContextAccessor = workContextAccessor;\n            _hostEnv = hostEnv;\n            _httpContextAccessor = httpContextAccessor;\n        }\n\n        #region IStorefrontUrlBuilder members\n\n        public string ToAppAbsolute(string virtualPath)\n        {\n            var workContext = _workContextAccessor.WorkContext;\n            return ToAppAbsolute(virtualPath, workContext.CurrentStore, workContext.CurrentLanguage);\n        }\n\n        public string ToAppAbsolute(string virtualPath, Store store, Language language)\n        {\n            var appRelativePath = ToAppRelative(virtualPath, store, language);\n\n            var result = appRelativePath != null && appRelativePath.StartsWith(\"~\")\n                ? _httpContextAccessor.HttpContext.Request.PathBase + appRelativePath.Replace(\"~\", string.Empty)\n                : appRelativePath;\n\n            return result;\n        }\n\n        public string ToStoreAbsolute(string virtualPath, Store store = null, Language language = null)\n        {\n            // Need to build from an host absolute url a  relative  store-based url\n            // http://localhost/Account/Login -> http://localhost/{store}/{lang}/Account/Login\n\n            // Need to be able to properly handle the following case:\n            // http://localhost/store/Account/Login?ReturnUrl=%2Fstore%2FElectronics%2Fen-US%2Faccount, storeUrl = \"http://localhost/store\"\n            // 1. Should trim store path \"/store\" from the url path \"/store/Account/Login\" => path should become \"/Account/Login\"\n            // 2. Check for url params (e.g. ReturnUrl) in query string and trim store url for them too. ReturnUrl=%2Fstore%2FElectronics%2Fen-US%2Faccount => ReturnUrl=%2FElectronics%2Fen-US%2Faccount\n\n            var uri = new Uri(virtualPath, UriKind.RelativeOrAbsolute);\n            var absolutePathOrUrl = ConvertPathToStoreAbsolutePathOrUrl(uri.IsAbsoluteUri ? uri.AbsolutePath : virtualPath, store, language);\n            var storeRelativeOrAbsoluteUrl = new Uri(absolutePathOrUrl, UriKind.RelativeOrAbsolute);\n            var urlBuilder = new UriBuilder(new Uri(uri, storeRelativeOrAbsoluteUrl))\n            {\n                Query = ConvertQueryUrlsToStoreAbsolutePaths(uri.Query, store, language)\n            };\n            return urlBuilder.Uri.ToString();\n        }\n\n        private string ConvertPathToStoreAbsolutePathOrUrl(PathString path, Store store = null, Language language = null)\n        {\n            var relativeToAppPath = path.TrimStorePath(_workContextAccessor.WorkContext.CurrentStore);\n            var storeUrl = store != null || language != null\n                ? ToAppAbsolute(relativeToAppPath.TrimStoreAndLangSegment(_workContextAccessor.WorkContext.CurrentStore, _workContextAccessor.WorkContext.CurrentLanguage),\n                    store ?? _workContextAccessor.WorkContext.CurrentStore,\n                    language ?? store.DefaultLanguage ?? _workContextAccessor.WorkContext.CurrentLanguage)\n                : ToAppAbsolute(relativeToAppPath);\n\n            return storeUrl;\n        }\n\n        /// <summary>\n        /// Trims store path for known url containing params. Encoding/Decoding is handled by HttpUtility.ParseQueryString.\n        /// </summary>\n        /// <param name=\"query\">Query params need to be converted.</param>\n        private string ConvertQueryUrlsToStoreAbsolutePaths(string query, Store store = null, Language language = null)\n        {\n            var queryParams = HttpUtility.ParseQueryString(query);\n            var allParamKeys = queryParams.AllKeys;\n\n            foreach (var paramName in UrlContainingQueryParameters)\n            {\n                var paramKey = allParamKeys.FirstOrDefault(x => x.EqualsInvariant(paramName));\n                var paramValue = paramKey != null ? queryParams[paramKey] : null;\n\n                // Need to check that param value is a valid relative url to avoid exception at PathString creation \n                if (paramKey != null && Uri.TryCreate(paramValue, UriKind.Relative, out _))\n                {\n                    queryParams[paramKey] = ConvertPathToStoreAbsolutePathOrUrl(new PathString(paramValue), store, language).ToAbsolutePath();\n                }\n            }\n\n            return queryParams.ToString();\n        }\n\n        public string ToAppRelative(string virtualPath)\n        {\n            var workContext = _workContextAccessor.WorkContext;\n            return ToAppRelative(virtualPath, workContext.CurrentStore, workContext.CurrentLanguage);\n        }\n\n        public string ToAppRelative(string virtualPath, Store store, Language language)\n        {\n            var workContext = _workContextAccessor.WorkContext;\n            var urlBuilderContext = workContext.ToToolsContext();\n\n            return _urlBuilder.BuildStoreUrl(urlBuilderContext, virtualPath, store.ToToolsStore(), null);\n        }\n\n        public string ToLocalPath(string virtualPath)\n        {\n            return _hostEnv.MapPath(virtualPath);\n        }\n        #endregion\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Swagger/ApiExplorerApiControllersConvention.cs",
    "content": "using System;\nusing Microsoft.AspNetCore.Mvc.ApplicationModels;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Swagger\n{\n    public class ApiExplorerApiControllersConvention : IControllerModelConvention\n    {\n        public void Apply(ControllerModel controller)\n        {\n            var controllerNamespace = controller.ControllerType.Namespace;\n            // Include only those controllers, whose namespace ends with .Api\n            controller.ApiExplorer.IsVisible = controllerNamespace.EndsWith(\".Api\", StringComparison.OrdinalIgnoreCase);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Swagger/ArrayInQueryParametersFilter.cs",
    "content": "using System.Linq;\nusing Microsoft.OpenApi.Models;\nusing Swashbuckle.AspNetCore.SwaggerGen;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Swagger\n{\n    /// <summary>\n    /// The workaround for openapi3/autorest query parameters serialization\n    /// See more: https://github.com/Azure/autorest/issues/3373, https://swagger.io/specification/\n    /// </summary>\n    public class ArrayInQueryParametersFilter : IOperationFilter\n    {\n        public void Apply(OpenApiOperation operation, OperationFilterContext context)\n        {\n            foreach (var parameter in operation.Parameters.Where(x => (x.In == ParameterLocation.Query && x.Schema.Type == \"array\")))\n            {\n                if (!parameter.Style.HasValue)\n                {\n                    parameter.Style = ParameterStyle.Form;\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Swagger/AuthResponsesOperationFilter.cs",
    "content": "using System.Linq;\nusing Microsoft.AspNetCore.Authorization;\nusing Microsoft.OpenApi.Models;\nusing Swashbuckle.AspNetCore.SwaggerGen;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Swagger\n{\n    public class AuthResponsesOperationFilter : IOperationFilter\n    {\n        public void Apply(OpenApiOperation operation, OperationFilterContext context)\n        {\n            var authAttributes = context.MethodInfo.DeclaringType.GetCustomAttributes(true)\n                .Union(context.MethodInfo.GetCustomAttributes(true))\n                .OfType<AuthorizeAttribute>();\n\n            if (authAttributes.Any())\n                operation.Responses.Add(\"401\", new OpenApiResponse { Description = \"Unauthorized\" });\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Swagger/ConsumeFromBodyFilter.cs",
    "content": "using Microsoft.OpenApi.Models;\nusing Swashbuckle.AspNetCore.SwaggerGen;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Swagger\n{\n    /// <summary>\n    /// This temporary filter removes broken \"application/*+json\" content-type.\n    /// It seems it's some openapi/swagger bug, because Autorest fails.        \n    /// </summary>\n    public class ConsumeFromBodyFilter : IOperationFilter\n    {\n        public void Apply(OpenApiOperation operation, OperationFilterContext context)\n        {\n            if (operation.RequestBody != null && operation.RequestBody.Content.Count > 0 && operation.RequestBody.Content.ContainsKey(\"application/*+json\"))\n            {\n                operation.RequestBody.Content.Remove(\"application/*+json\");\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Swagger/EnumSchemaFilter.cs",
    "content": "using System;\nusing Microsoft.OpenApi.Any;\nusing Microsoft.OpenApi.Models;\nusing Swashbuckle.AspNetCore.SwaggerGen;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Swagger\n{\n    /// <summary>\n    /// Compatibility: publish enumeration values as strings instead of integers (default in openapi 3)\n    /// </summary>\n    public class EnumSchemaFilter : ISchemaFilter\n    {\n        public void Apply(OpenApiSchema schema, SchemaFilterContext context)\n        {\n            var type = context.Type;\n            if (type.IsEnum)\n            {\n                schema.Format = null;\n                schema.Type = \"string\";\n                schema.Enum.Clear();\n                foreach (var enumValueInString in Enum.GetNames(type))\n                {\n                    schema.Enum.Add(new OpenApiString(enumValueInString));\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Swagger/FileResponseTypeFilter.cs",
    "content": "using System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Net;\nusing Microsoft.OpenApi.Models;\nusing Swashbuckle.AspNetCore.SwaggerGen;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Swagger\n{\n    public class FileResponseTypeFilter : IOperationFilter\n    {\n        public void Apply(OpenApiOperation operation, OperationFilterContext context)\n        {\n            if (IsFileResponse(context))\n            {\n                var key = ((int)HttpStatusCode.OK).ToString();\n                // Attention!\n                // Accordingly to: https://swagger.io/docs/specification/describing-responses/#response-that-returns-a-file\n                // the type of response should have Format = \"binary\", Type = \"string\".\n                var responseSchema = new OpenApiSchema { Format = \"binary\", Type = \"string\" };\n\n                if (operation.Responses == null)\n                {\n                    operation.Responses = new OpenApiResponses();\n                }\n\n                if (!operation.Responses.TryGetValue(key, out var response))\n                {\n                    response = new OpenApiResponse();\n                }\n\n                response.Description = \"OK\";\n                response.Content = new Dictionary<string, OpenApiMediaType>\n                {\n                    { \"multipart/form-data\", new OpenApiMediaType() { Schema = responseSchema } }\n                };\n            }\n        }\n\n        private static bool IsFileResponse(OperationFilterContext context)\n        {\n            var fileResponseAttributes = context.MethodInfo.DeclaringType.GetCustomAttributes(true)\n                .Union(context.MethodInfo.GetCustomAttributes(true))\n                .OfType<SwaggerFileResponseAttribute>();\n\n            var result = fileResponseAttributes.Any();\n\n            if (!result)\n            {\n                result = context.ApiDescription.SupportedResponseTypes.Any(r => r.Type == typeof(Stream));\n            }\n            return result;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Swagger/FileUploadOperationFilter.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nusing Microsoft.OpenApi.Models;\nusing Swashbuckle.AspNetCore.SwaggerGen;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Swagger\n{\n    //[CLSCompliant(false)]\n    public class FileUploadOperationFilter : IOperationFilter\n    {\n        public void Apply(OpenApiOperation operation, OperationFilterContext context)\n        {\n            if (context.ApiDescription.TryGetMethodInfo(out var methodInfo))\n            {\n                var requestAttributes = methodInfo.GetCustomAttributes<UploadFileAttribute>().ToArray();\n                operation.Parameters ??= new List<OpenApiParameter>();\n\n                foreach (var attr in requestAttributes)\n                {\n                    operation.Parameters.Add(new OpenApiParameter\n                    {\n                        Name = attr.Name,\n                        Description = attr.Description,\n                        In = ParameterLocation.Query,\n                        Required = attr.Required,\n                        Schema = new OpenApiSchema() { Type = attr.Type }\n                    });\n                }\n\n                if (requestAttributes.Any(x => x.Type == \"file\"))\n                {\n                    // https://swagger.io/docs/specification/describing-request-body/file-upload/\n                    operation.RequestBody = new OpenApiRequestBody()\n                    {\n                        Content = { [\"multipart/form-data\"] =\n                            new OpenApiMediaType() {\n                                    Schema = new OpenApiSchema() { Type = \"object\",\n                                    Properties = { [\"file\"] = new OpenApiSchema() {\n                                            Description = \"Select file\", Type = \"string\", Format = \"binary\"\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    };\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Swagger/NewtonsoftJsonIgnoreFilter.cs",
    "content": "using System.Linq;\nusing Microsoft.OpenApi.Models;\nusing Swashbuckle.AspNetCore.SwaggerGen;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Swagger\n{\n    /// <summary>\n    /// Allows to ignore <see cref=\"Newtonsoft.Json.JsonIgnoreAttribute\"/>.\n    /// </summary>\n    public class NewtonsoftJsonIgnoreFilter : ISchemaFilter\n    {\n        public void Apply(OpenApiSchema schema, SchemaFilterContext context)\n        {\n            var type = context.Type;\n            foreach (var prop in type.GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance)\n                                     .Where(p => p.GetCustomAttributes(typeof(Newtonsoft.Json.JsonIgnoreAttribute), true)?.Any() == true))\n            {\n                var propName = prop.Name[0].ToString().ToLower() + prop.Name.Substring(1);\n                if (schema?.Properties?.ContainsKey(propName) == true)\n                    schema?.Properties?.Remove(propName);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Swagger/OptionalParametersFilter.cs",
    "content": "using System.Linq;\nusing Microsoft.AspNetCore.Mvc.Controllers;\nusing Microsoft.OpenApi.Models;\nusing Swashbuckle.AspNetCore.SwaggerGen;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Swagger\n{\n    public class OptionalParametersFilter : IOperationFilter\n    {\n        public void Apply(OpenApiOperation operation, OperationFilterContext context)\n        {\n            if (operation.Parameters == null || !operation.Parameters.Any())\n            {\n                return;\n            }\n\n            var optionalParameters = context.ApiDescription.ParameterDescriptions\n                .Where(p => p.ParameterDescriptor != null &&\n                ((ControllerParameterDescriptor)p.ParameterDescriptor).ParameterInfo.CustomAttributes.Any(attr => attr.AttributeType == typeof(SwaggerOptionalAttribute))).ToList();\n\n            foreach (var apiParameter in optionalParameters)\n            {\n                var parameter = operation.Parameters.FirstOrDefault(p => p.Name == apiParameter.Name);\n                if (parameter != null)\n                {\n                    parameter.Required = false;\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Swagger/SwaggerFileResponseAttribute.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Swagger\n{\n    /// <summary>\n    /// Mark with this attribute all API methods which returned stream response\n    /// for  correct generation  swagger API document schema\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Method, Inherited = false)]\n    public class SwaggerFileResponseAttribute : Attribute\n    {\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Swagger/SwaggerOptionalAttribute.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Swagger\n{\n    [AttributeUsage(AttributeTargets.Parameter, Inherited = false)]\n    public class SwaggerOptionalAttribute : Attribute\n    {\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Infrastructure/Swagger/UploadFileAttribute.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Swagger\n{\n    /// <summary> \n    /// Use this attribute for controllers methods to allow file upload via Swagger \n    /// </summary>\n    [AttributeUsage(AttributeTargets.Method)]\n    public sealed class UploadFileAttribute : Attribute\n    {\n        /// <summary>\n        /// The parameter name in the resulting swagger doc \n        /// </summary>\n        public string Name { get; set; } = \"uploadedFile\";\n        /// <summary>\n        /// The parameter description in the resulting swagger doc \n        /// </summary>\n        public string Description { get; set; } = \"Upload File\";\n        /// <summary>\n        /// Parameter type (only string value supported)\n        /// Accordingly to: // https://swagger.io/docs/specification/describing-request-body/file-upload/\n        /// </summary>\n        public string Type { get; set; } = \"string\";\n        /// <summary>\n        /// Set true for required parameter\n        /// </summary>\n        public bool Required { get; set; } = false;\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Middleware/NoLiquidThemeMiddleware.cs",
    "content": "using System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Http;\nusing VirtoCommerce.LiquidThemeEngine;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Models;\n\nnamespace VirtoCommerce.Storefront.Middleware\n{\n    public class NoLiquidThemeMiddleware\n    {\n        public const string NoThemeModelKey = \"NoLiquidThemeMiddleware.NoThemeModel\";\n        private readonly RequestDelegate _next;\n        private readonly IWorkContextAccessor _workContextAccessor;\n        private readonly ILiquidThemeEngine _liquidThemeEngine;\n        public NoLiquidThemeMiddleware(RequestDelegate next, IWorkContextAccessor workContextAccessor, ILiquidThemeEngine liquidThemeEngine)\n        {\n            _next = next;\n            _workContextAccessor = workContextAccessor;\n            _liquidThemeEngine = liquidThemeEngine;\n        }\n\n        public async Task Invoke(HttpContext context)\n        {\n            var workContext = _workContextAccessor.WorkContext;\n            if (workContext != null && string.IsNullOrEmpty(_liquidThemeEngine.ResolveTemplatePath(\"index\")))\n            {\n                context.Request.Path = \"/common/notheme\";\n                context.Items[NoThemeModelKey] = new NoThemeViewModel { SearchedLocations = _liquidThemeEngine.DiscoveryPaths.ToList() };\n            }\n\n            await _next(context);\n        }\n    }\n\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Middleware/StoreMaintenanceMiddleware.cs",
    "content": "using System.Threading.Tasks;\nusing Microsoft.AspNetCore.Http;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Middleware\n{\n    public class StoreMaintenanceMiddleware\n    {\n        private readonly RequestDelegate _next;\n        private readonly IWorkContextAccessor _workContextAccessor;\n        public StoreMaintenanceMiddleware(RequestDelegate next, IWorkContextAccessor workContextAccessor)\n        {\n            _next = next;\n            _workContextAccessor = workContextAccessor;\n        }\n\n        public async Task Invoke(HttpContext context)\n        {\n            var workContext = _workContextAccessor.WorkContext;\n            if (workContext != null && workContext.CurrentStore != null && workContext.CurrentStore.StoreState == StoreStatus.Closed)\n            {\n                context.Request.Path = \"/common/maintenance\";\n            }\n\n            await _next(context);\n        }\n    }\n\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Middleware/WorkContextBuildMiddleware.cs",
    "content": "using System.Collections.Generic;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Diagnostics;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.AspNetCore.Http.Features;\nusing Microsoft.Extensions.Hosting;\nusing Microsoft.Extensions.Options;\nusing VirtoCommerce.Storefront.Domain;\nusing VirtoCommerce.Storefront.Domain.Security;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Security;\n\nnamespace VirtoCommerce.Storefront.Middleware\n{\n    public class WorkContextBuildMiddleware\n    {\n        private readonly RequestDelegate _next;\n        private readonly IWebHostEnvironment _hostingEnvironment;\n        private readonly StorefrontOptions _options;\n        private readonly IWorkContextAccessor _workContextAccessor;\n        private readonly Dictionary<string, object> _applicationSettings = null;\n\n        public WorkContextBuildMiddleware(RequestDelegate next, IWebHostEnvironment hostingEnvironment,\n                                          IOptions<StorefrontOptions> options, IWorkContextAccessor workContextAccessor)\n        {\n            _next = next;\n            _hostingEnvironment = hostingEnvironment;\n            _workContextAccessor = workContextAccessor;\n            _options = options.Value;\n        }\n\n        public async Task Invoke(HttpContext context)\n        {\n            //Do not process for exist exception \n            var exceptionFeature = context.Features.Get<IExceptionHandlerFeature>();\n            if (exceptionFeature != null)\n            {\n                await _next(context);\n                return;\n            }\n\n            var builder = new WorkContextBuilder(context, _options);\n            var workContext = builder.WorkContext;\n\n            workContext.IsDevelopment = _hostingEnvironment.IsDevelopment();\n            workContext.ApplicationSettings = _applicationSettings;\n            //The important to preserve the order of initialization\n            await builder.WithCountriesAsync();\n\n            await builder.WithStoresAsync(_options.DefaultStore);\n            await builder.WithCurrentUserAsync();\n            await builder.WithCurrenciesAsync(workContext.CurrentLanguage, workContext.CurrentStore);\n\n            await builder.WithMenuLinksAsync(workContext.CurrentStore, workContext.CurrentLanguage);\n            await builder.WithPagesAsync(workContext.CurrentStore, workContext.CurrentLanguage);\n            await builder.WithBlogsAsync(workContext.CurrentStore, workContext.CurrentLanguage);\n            await builder.WithTemplatesAsync(workContext.CurrentStore);\n\n\n            //EU General Data Protection Regulation (GDPR) support \n            var consentFeature = context.Features.Get<ITrackingConsentFeature>();\n            if (consentFeature != null)\n            {\n                workContext.CanTrack = !consentFeature?.CanTrack ?? false;\n                workContext.ConsentCookie = consentFeature?.CreateConsentCookie();\n            }\n            workContext.AvailableRoles = SecurityConstants.Roles.AllRoles;\n            workContext.BusinessToBusinessRoles = SecurityConstants.Roles.B2BRoles;\n            _workContextAccessor.WorkContext = workContext;\n\n            if (workContext.IsPreviewMode)\n            {\n                context.Response.Headers.Append(\"non-cached-result\", \"true\");\n            }\n\n            await _next(context);\n        }\n    }\n\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Models/NoThemeViewModel.cs",
    "content": "using System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Models\n{\n    public class NoThemeViewModel\n    {\n        public NoThemeViewModel()\n        {\n            SearchedLocations = new List<string>();\n        }\n        public IEnumerable<string> SearchedLocations { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Models/ResetCacheModel.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace VirtoCommerce.Storefront.Models\n{\n    /// <summary>\n    /// Cache Event Model For Web Hook from Virto Commmerce Platform\n    /// </summary>\n    public class ResetCacheEventModel\n    {\n        public string EventId { get; set; }\n\n        public ResetCacheEventBodyModel[] EventBody { get; set; }\n    }\n\n    public class ResetCacheEventBodyModel\n    {\n        public string ObjectType { get; set; }\n\n        public string Id { get; set; }\n\n        public string Path { get; set; }\n\n        public string Type { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Program.cs",
    "content": "using System.IO;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.Hosting;\nusing Microsoft.Extensions.Logging;\n\nnamespace VirtoCommerce.Storefront\n{\n    public static class Program\n    {\n        public static void Main(string[] args)\n        {\n            CreateWebHostBuilder(args).Build().Run();\n        }\n\n        public static IHostBuilder CreateWebHostBuilder(string[] args) =>\n           Host.CreateDefaultBuilder(args)\n              .UseContentRoot(Directory.GetCurrentDirectory())\n              .ConfigureLogging((hostingContext, logging) =>\n              {\n                  logging.AddConfiguration(hostingContext.Configuration.GetSection(\"Logging\"));\n                  logging.AddConsole();\n                  logging.AddDebug();\n                  //Enable Azure logging\n                  //https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-3.1#logging-in-azure\n                  logging.AddAzureWebAppDiagnostics();\n              })\n              .ConfigureWebHostDefaults(webBuilder =>\n              {\n                  webBuilder.UseStartup<Startup>();\n                  webBuilder.UseIISIntegration();\n              });\n\n    }\n\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Properties/launchSettings.json",
    "content": "{\n  \"profiles\": {\n    \"IIS Express\": {\n      \"commandName\": \"IISExpress\",\n      \"launchBrowser\": true,\n      \"environmentVariables\": {\n        \"ASPNETCORE_ENVIRONMENT\": \"Development\"\n      }\n    },\n    \"VirtoCommerce.Storefront\": {\n      \"commandName\": \"Project\",\n      \"launchBrowser\": true,\n      \"environmentVariables\": {\n        \"ASPNETCORE_preventHostingStartup\": \"True\",\n        \"ASPNETCORE_ENVIRONMENT\": \"Development\"\n      },\n      \"applicationUrl\": \"https://localhost:4302/\"\n    }\n  },\n  \"iisSettings\": {\n    \"windowsAuthentication\": false,\n    \"anonymousAuthentication\": true,\n    \"iisExpress\": {\n      \"applicationUrl\": \"http://localhost:2082/\",\n      \"sslPort\": 0\n    }\n  }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront/Routing/ISlugRouteService.cs",
    "content": "using System.Threading.Tasks;\nusing VirtoCommerce.Storefront.Model;\n\nnamespace VirtoCommerce.Storefront.Routing\n{\n    public interface ISlugRouteService\n    {\n        Task<SlugRouteResponse> HandleSlugRequestAsync(string slugPath, WorkContext workContext);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Routing/MapStorefrontRouteBuilderExtension.cs",
    "content": "using Microsoft.AspNetCore.Routing;\nusing Microsoft.Extensions.DependencyInjection;\n\nnamespace VirtoCommerce.Storefront.Routing\n{\n    /// <summary>\n    /// Provides extension methods for <see cref=\"IRouteBuilder\"/> to add routes.\n    /// </summary>\n    public static class MapStorefrontRouteBuilderExtension\n    {\n        public static IRouteBuilder MapStorefrontRoute(\n            this IRouteBuilder routeBuilder,\n            string name,\n            string template)\n        {\n            return MapStorefrontRoute(routeBuilder, name, template, defaults: null);\n        }\n\n        public static IRouteBuilder MapStorefrontRoute(\n            this IRouteBuilder routeBuilder,\n            string name,\n            string template,\n            object defaults)\n        {\n            return MapStorefrontRoute(routeBuilder, name, template, defaults, constraints: null);\n        }\n\n\n        public static IRouteBuilder MapStorefrontRoute(\n            this IRouteBuilder routeBuilder,\n            string name,\n            string template,\n            object defaults,\n            object constraints)\n        {\n            return MapStorefrontRoute(routeBuilder, name, template, defaults, constraints, dataTokens: null);\n        }\n\n\n        public static IRouteBuilder MapStorefrontRoute(\n            this IRouteBuilder routeBuilder,\n            string name,\n            string template,\n            object defaults,\n            object constraints,\n            object dataTokens)\n        {\n            if (routeBuilder.DefaultHandler == null)\n            {\n                throw new RouteCreationException($\"Must be set { nameof(IRouteBuilder) }\");\n            }\n\n            var inlineConstraintResolver = routeBuilder\n                .ServiceProvider\n                .GetRequiredService<IInlineConstraintResolver>();\n\n            routeBuilder.Routes.Add(new StorefrontRoute(\n                routeBuilder.DefaultHandler,\n                name,\n                template,\n                new RouteValueDictionary(defaults),\n                new RouteValueDictionary(constraints),\n                new RouteValueDictionary(dataTokens),\n                inlineConstraintResolver));\n\n            return routeBuilder;\n        }\n\n        public static IRouteBuilder MapSlugRoute(\n           this IRouteBuilder routeBuilder,\n           string template,\n           object defaults)\n        {\n            if (routeBuilder.DefaultHandler == null)\n            {\n                throw new RouteCreationException($\"Must be set { nameof(IRouteBuilder) }\");\n            }\n\n            var inlineConstraintResolver = routeBuilder\n                .ServiceProvider\n                .GetRequiredService<IInlineConstraintResolver>();\n\n            routeBuilder.Routes.Add(new SlugRoute(\n                routeBuilder.DefaultHandler,\n                template,\n                new RouteValueDictionary(defaults),\n                inlineConstraintResolver));\n\n            return routeBuilder;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Routing/RoutingCacheRegion.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common.Caching;\n\nnamespace VirtoCommerce.Storefront.Routing\n{\n    public class RoutingCacheRegion : CancellableCacheRegion<RoutingCacheRegion>\n    {\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Routing/SlugRoute.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Mvc;\nusing Microsoft.AspNetCore.Mvc.Abstractions;\nusing Microsoft.AspNetCore.Mvc.Controllers;\nusing Microsoft.AspNetCore.Mvc.Infrastructure;\nusing Microsoft.AspNetCore.Routing;\nusing Microsoft.Extensions.DependencyInjection;\nusing VirtoCommerce.Storefront.Extensions;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Routing\n{\n    /// <summary>\n    /// Reads the slug from request path and tried to find object and controller best matched to it\n    /// </summary>\n    public class SlugRoute : Route\n    {\n        public SlugRoute(IRouter target, string template, RouteValueDictionary defaults, IInlineConstraintResolver inlineConstraintResolver)\n            : base(target, template, defaults, null, null, inlineConstraintResolver)\n        {\n        }\n\n        protected override async Task OnRouteMatched(RouteContext context)\n        {\n            var serviceProvider = context.HttpContext.RequestServices;\n\n            var seoRouteService = serviceProvider.GetRequiredService<ISlugRouteService>();\n            var storefrontUrlBuilder = serviceProvider.GetRequiredService<IStorefrontUrlBuilder>();\n            var workContext = serviceProvider.GetRequiredService<IWorkContextAccessor>().WorkContext;\n\n            var path = context.HttpContext.Request.Path.TrimStoreAndLangSegment(workContext.CurrentStore, workContext.CurrentLanguage).ToString().TrimStart('/');\n\n            if (!string.IsNullOrEmpty(path))\n            {\n                var seoRouteResponse = await seoRouteService.HandleSlugRequestAsync(path, workContext);\n\n                if (seoRouteResponse != null)\n                {\n                    if (seoRouteResponse.Redirect)\n                    {\n                        //Redirect via call specific controller method (because usage of Response.Redirect leads to the rendering the main page)\n                        context.RouteData.Values[\"action\"] = \"InternalRedirect\";\n                        context.RouteData.Values[\"controller\"] = \"Common\";\n                        context.RouteData.Values[\"url\"] = storefrontUrlBuilder.ToAppAbsolute(seoRouteResponse.RedirectLocation);\n                    }\n                    else if (seoRouteResponse.RouteData != null)\n                    {\n                        foreach (var kvp in seoRouteResponse.RouteData)\n                        {\n                            context.RouteData.Values[kvp.Key] = kvp.Value;\n                        }\n                    }\n\n                    var actionDescriptor = FindMatchingActionDescriptor(context.RouteData.Values, serviceProvider);\n\n                    if (actionDescriptor != null)\n                    {\n                        context.Handler = httpContext =>\n                        {\n                            var actionContext = new ActionContext(httpContext, context.RouteData, actionDescriptor);\n\n                            var actionInvokerFactory = serviceProvider.GetRequiredService<IActionInvokerFactory>();\n                            var invoker = actionInvokerFactory.CreateInvoker(actionContext);\n\n                            return invoker.InvokeAsync();\n                        };\n\n                        return;\n                    }\n                }\n            }\n            await base.OnRouteMatched(context);\n        }\n\n        private ActionDescriptor FindMatchingActionDescriptor(IReadOnlyDictionary<string, object> routeDataValues,\n            IServiceProvider serviceProvider)\n        {\n            if (!routeDataValues.TryGetValue(\"controller\", out var controllerNameObject))\n            {\n                return null;\n            }\n\n            if (!routeDataValues.TryGetValue(\"action\", out var actionNameObject))\n            {\n                return null;\n            }\n\n            var controllerName = (string)controllerNameObject;\n            var actionName = (string)actionNameObject;\n\n            var actionDescriptorCollectionProvider = serviceProvider.GetRequiredService<IActionDescriptorCollectionProvider>();\n            var actions = actionDescriptorCollectionProvider.ActionDescriptors;\n\n            var controllerActions = actions.Items.OfType<ControllerActionDescriptor>();\n\n            var matchingAction = controllerActions.FirstOrDefault(action =>\n                action.ControllerName == controllerName &&\n                action.ActionName == actionName);\n\n            return matchingAction;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Routing/SlugRouteResponse.cs",
    "content": "using System;\nusing System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Routing\n{\n    public class SlugRouteResponse\n    {\n        public SlugRouteResponse()\n        {\n            RouteData = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);\n        }\n\n        public bool Redirect { get; set; }\n        public string RedirectLocation { get; set; }\n        public IDictionary<string, object> RouteData { get; private set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Routing/SlugRouteService.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.Caching.Memory;\nusing VirtoCommerce.Storefront.AutoRestClients.CatalogModuleApi;\nusing VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi;\nusing VirtoCommerce.Storefront.Common;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Caching;\nusing VirtoCommerce.Storefront.Model.StaticContent;\nusing VirtoCommerce.Storefront.Model.Stores;\nusing coreDto = VirtoCommerce.Storefront.AutoRestClients.CoreModuleApi.Models;\n\nnamespace VirtoCommerce.Storefront.Routing\n{\n    public class SlugRouteService : ISlugRouteService\n    {\n        private readonly IStorefrontMemoryCache _memoryCache;\n        private readonly ICommerce _coreApi;\n        private readonly IApiChangesWatcher _apiChangesWatcher;\n        private readonly ICatalogModuleCategories _apiCategories;\n        private readonly ICatalogModuleProducts _apiProducts;\n\n\n        public SlugRouteService(\n            IStorefrontMemoryCache memoryCache,\n            ICommerce coreApi,\n            IApiChangesWatcher apiChangesWatcher,\n            ICatalogModuleCategories apiCategories,\n            ICatalogModuleProducts apiProducts)\n        {\n            _memoryCache = memoryCache;\n            _coreApi = coreApi;\n            _apiChangesWatcher = apiChangesWatcher;\n            _apiCategories = apiCategories;\n            _apiProducts = apiProducts;\n        }\n\n        public virtual async Task<SlugRouteResponse> HandleSlugRequestAsync(string slugPath, WorkContext workContext)\n        {\n            var entity = new SlugRoutingData { ObjectType = \"Asset\", SeoPath = slugPath };\n            //Do not use slug routing for SPA themes\n            if (!workContext.CurrentStore.IsSpa)\n            {\n                entity = await FindEntityBySlugPath(slugPath, workContext) ?? entity;\n            }\n\n            var response = entity.SeoPath.EqualsInvariant(slugPath) ? View(entity) : Redirect(entity);\n            return response;\n        }\n\n        protected virtual SlugRouteResponse View(SlugRoutingData routingData)\n        {\n            var response = new SlugRouteResponse();\n\n            switch (routingData.ObjectType)\n            {\n                case \"Asset\":\n                    response.RouteData[\"action\"] = \"GetThemeAssets\";\n                    response.RouteData[\"controller\"] = \"Asset\";\n                    response.RouteData[\"path\"] = routingData.SeoPath;\n                    break;\n            }\n\n            return response;\n        }\n\n        protected virtual SlugRouteResponse Redirect(SlugRoutingData entity)\n        {\n            return new SlugRouteResponse\n            {\n                Redirect = true,\n                RedirectLocation = entity.SeoPath,\n            };\n        }\n\n        protected virtual async Task<SlugRoutingData> FindEntityBySlugPath(string path, WorkContext workContext)\n        {\n            path = path.Trim('/');\n\n            var slugs = path.Split('/');\n            var lastSlug = slugs.LastOrDefault();\n\n            // Get all SEO records for requested slug and also all other SEO records with different slug and languages but related to the same object\n            var allSeoRecords = await GetAllSeoRecordsAsync(lastSlug);\n            var bestSeoRecords = GetBestMatchingSeoRecords(allSeoRecords, workContext.CurrentStore, workContext.CurrentLanguage, lastSlug);\n\n            var routingComparer = AnonymousComparer.Create((SlugRoutingData x) => string.Join(\":\", x.ObjectType, x.ObjectId, x.SeoPath));\n            // Find distinct objects\n            var entities = bestSeoRecords\n                .Select(s => new SlugRoutingData { ObjectType = s.ObjectType, ObjectId = s.ObjectId, SeoPath = s.SemanticUrl })\n                .Distinct(routingComparer)\n                .ToList();\n\n            // Don't load objects for non-SEO links\n            if (workContext.CurrentStore.SeoLinksType != SeoLinksType.None)\n            {\n                foreach (var group in entities.GroupBy(e => e.ObjectType))\n                {\n                    await LoadObjectsAndBuildFullSeoPaths(group.Key, group.ToList(), workContext.CurrentStore, workContext.CurrentLanguage);\n                }\n\n                entities = entities.Where(e => !string.IsNullOrEmpty(e.SeoPath)).ToList();\n            }\n\n            // If found multiple entities, keep those which have the requested SEO path\n            if (entities.Count > 1)\n            {\n                entities = entities.Where(e => e.SeoPath.EqualsInvariant(path)).ToList();\n            }\n\n            // If still found multiple entities, give up\n            var result = entities.Count == 1 ? entities.FirstOrDefault() : null;\n\n            if (result == null)\n            {\n                // Try to find a static page\n                var page = FindPageBySeoPath(path, workContext);\n                if (page != null)\n                {\n                    result = new SlugRoutingData\n                    {\n                        ObjectType = \"Page\",\n                        SeoPath = page.Url,\n                        ObjectInstance = page,\n                    };\n                }\n            }\n\n            return result;\n        }\n\n        protected virtual ContentItem FindPageBySeoPath(string seoPath, WorkContext workContext)\n        {\n            ContentItem result = null;\n\n            if (workContext.Pages != null)\n            {\n                var pages = workContext.Pages\n                    .Where(p => string.Equals(p.Url, seoPath, StringComparison.OrdinalIgnoreCase))\n                    .ToList();\n\n                // Find page with current language\n                result = pages.FirstOrDefault(x => x.Language == workContext.CurrentLanguage);\n\n                if (result == null)\n                {\n                    // Find page with invariant language\n                    result = pages.FirstOrDefault(x => x.Language.IsInvariant);\n                }\n\n                if (result == null)\n                {\n                    // Check alternate page URLs\n                    result = workContext.Pages.FirstOrDefault(x => x.AliasesUrls.Contains(seoPath, StringComparer.OrdinalIgnoreCase));\n                }\n            }\n\n            return result;\n        }\n\n        protected virtual async Task<IList<coreDto.SeoInfo>> GetAllSeoRecordsAsync(string slug)\n        {\n            var result = new List<coreDto.SeoInfo>();\n\n            if (!string.IsNullOrEmpty(slug))\n            {\n                var cacheKey = CacheKey.With(GetType(), \"GetAllSeoRecords\", slug);\n                var apiResult = await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n                {\n                    cacheEntry.AddExpirationToken(RoutingCacheRegion.CreateChangeToken());\n                    cacheEntry.AddExpirationToken(_apiChangesWatcher.CreateChangeToken());\n                    return await _coreApi.GetSeoInfoBySlugAsync(slug);\n                });\n                result.AddRange(apiResult);\n            }\n            return result;\n        }\n\n        protected virtual IList<coreDto.SeoInfo> GetBestMatchingSeoRecords(IEnumerable<coreDto.SeoInfo> allSeoRecords, Store store, Language language, string slug)\n        {\n            return allSeoRecords.GetBestMatchingSeoInfos(store, language, slug);\n        }\n\n        protected virtual async Task LoadObjectsAndBuildFullSeoPaths(string objectType, IList<SlugRoutingData> objects, Store store, Language language)\n        {\n            var objectIds = objects.Select(o => o.ObjectId).ToArray();\n            var seoPaths = await GetFullSeoPathsAsync(objectType, objectIds, store, language);\n\n            if (seoPaths != null)\n            {\n                foreach (var seo in objects)\n                {\n                    seo.SeoPath = seoPaths[seo.ObjectId];\n                }\n            }\n        }\n\n        protected virtual async Task<IDictionary<string, string>> GetFullSeoPathsAsync(string objectType, string[] objectIds, Store store, Language language)\n        {\n            var cacheKey = CacheKey.With(GetType(), \"GetFullSeoPaths\", store.Id, objectType, string.Join(\"-\", objectIds.OrderBy(x => x)));\n            var result = await _memoryCache.GetOrCreateExclusiveAsync(cacheKey, async (cacheEntry) =>\n           {\n               cacheEntry.AddExpirationToken(RoutingCacheRegion.CreateChangeToken());\n               cacheEntry.AddExpirationToken(_apiChangesWatcher.CreateChangeToken());\n               switch (objectType)\n               {\n                   case \"Category\":\n                       return await GetCategorySeoPathsAsync(objectIds, store, language);\n                   case \"CatalogProduct\":\n                       return await GetProductSeoPathsAsync(objectIds, store, language);\n               }\n               return new Dictionary<string, string>().WithDefaultValue(null);\n           });\n            return result;\n        }\n\n\n        protected virtual async Task<IDictionary<string, string>> GetCategorySeoPathsAsync(string[] objectIds, Store store, Language language)\n        {\n            var result = await _apiCategories.GetCategoriesByPlentyIdsAsync(objectIds, \"WithOutlines|WithSeo\");\n            return result.ToDictionary(x => x.Id, x => x.Outlines.GetSeoPath(store, language, null)).WithDefaultValue(null);\n        }\n\n        protected virtual async Task<IDictionary<string, string>> GetProductSeoPathsAsync(string[] objectIds, Store store, Language language)\n        {\n            var result = await _apiProducts.GetProductByPlentyIdsAsync(objectIds, \"Outlines|Seo\");\n            return result.ToDictionary(x => x.Id, x => x.Outlines.GetSeoPath(store, language, null)).WithDefaultValue(null);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Routing/StorefrontApiRouteAttribute.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Infrastructure\n{\n    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]\n    public class StorefrontApiRouteAttribute : StorefrontRouteAttribute\n    {\n        public StorefrontApiRouteAttribute()\n            : this(string.Empty)\n        {\n        }\n\n        public StorefrontApiRouteAttribute(string template)\n            : base($\"storefrontapi/{template}\")\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Routing/StorefrontRoute.cs",
    "content": "using System.Collections.Generic;\nusing Microsoft.AspNetCore.Routing;\n\nnamespace VirtoCommerce.Storefront.Routing\n{\n    public class StorefrontRoute : Route\n    {\n        private const string _regexp = \"\";\n        public StorefrontRoute(IRouter target, string routeTemplate, IInlineConstraintResolver inlineConstraintResolver)\n            : this(target, routeTemplate, null, null, null, inlineConstraintResolver)\n        {\n        }\n\n        public StorefrontRoute(IRouter target, string routeTemplate, RouteValueDictionary defaults, IDictionary<string, object> constraints, RouteValueDictionary dataTokens, IInlineConstraintResolver inlineConstraintResolver)\n            : this(target, null, routeTemplate, defaults, constraints, dataTokens, inlineConstraintResolver)\n        {\n        }\n\n        public StorefrontRoute(IRouter target, string routeName, string routeTemplate, RouteValueDictionary defaults, IDictionary<string, object> constraints, RouteValueDictionary dataTokens, IInlineConstraintResolver inlineConstraintResolver)\n            : base(target, routeName, _regexp + routeTemplate, defaults, constraints, dataTokens, inlineConstraintResolver)\n        {\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Routing/StorefrontRouteAttribute.cs",
    "content": "using System;\nusing Microsoft.AspNetCore.Mvc.Routing;\n\nnamespace VirtoCommerce.Storefront.Infrastructure\n{\n    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]\n    public class StorefrontRouteAttribute : Attribute, IRouteTemplateProvider\n    {\n        private const string _regexp = \"\";\n\n        public StorefrontRouteAttribute()\n            : this(string.Empty)\n        {\n        }\n\n        public StorefrontRouteAttribute(string template)\n        {\n            Template = _regexp + template;\n        }\n\n        #region IRouteTemplateProvider members\n        public string Template\n        {\n            get;\n            private set;\n        }\n\n        public int? Order => 0;\n\n        public string Name => null;\n        #endregion\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Startup.cs",
    "content": "using System;\nusing System.IO;\nusing System.Linq;\nusing System.Text.Encodings.Web;\nusing System.Text.Unicode;\nusing FluentValidation.AspNetCore;\nusing GraphQL.Client.Abstractions;\nusing GraphQL.Client.Http;\nusing GraphQL.Client.Serializer.Newtonsoft;\nusing Microsoft.ApplicationInsights.Extensibility.Implementation;\nusing Microsoft.AspNetCore.Authorization;\nusing Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Diagnostics.HealthChecks;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.AspNetCore.HttpsPolicy;\nusing Microsoft.AspNetCore.Identity;\nusing Microsoft.AspNetCore.Mvc;\nusing Microsoft.AspNetCore.Rewrite;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Diagnostics.HealthChecks;\nusing Microsoft.Extensions.Hosting;\nusing Microsoft.Extensions.Options;\nusing Microsoft.Extensions.WebEncoders;\nusing Microsoft.OpenApi.Models;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Converters;\nusing Newtonsoft.Json.Serialization;\nusing ProxyKit;\nusing Swashbuckle.AspNetCore.SwaggerGen;\nusing VirtoCommerce.LiquidThemeEngine;\nusing VirtoCommerce.Storefront.Caching;\nusing VirtoCommerce.Storefront.DependencyInjection;\nusing VirtoCommerce.Storefront.Domain;\nusing VirtoCommerce.Storefront.Domain.Security;\nusing VirtoCommerce.Storefront.Extensions;\nusing VirtoCommerce.Storefront.Filters;\nusing VirtoCommerce.Storefront.Infrastructure;\nusing VirtoCommerce.Storefront.Infrastructure.ApplicationInsights;\nusing VirtoCommerce.Storefront.Infrastructure.Autorest;\nusing VirtoCommerce.Storefront.Infrastructure.HealthCheck;\nusing VirtoCommerce.Storefront.Infrastructure.Swagger;\nusing VirtoCommerce.Storefront.Middleware;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Bus;\nusing VirtoCommerce.Storefront.Model.Common.Events;\nusing VirtoCommerce.Storefront.Model.Customer.Services;\nusing VirtoCommerce.Storefront.Model.Features;\nusing VirtoCommerce.Storefront.Model.LinkList.Services;\nusing VirtoCommerce.Storefront.Model.Security;\nusing VirtoCommerce.Storefront.Model.StaticContent;\nusing VirtoCommerce.Storefront.Model.Stores;\nusing VirtoCommerce.Storefront.Routing;\nusing VirtoCommerce.Tools;\nusing SameSiteMode = Microsoft.AspNetCore.Http.SameSiteMode;\n\nnamespace VirtoCommerce.Storefront\n{\n    public class Startup\n    {\n        public Startup(IConfiguration configuration, IWebHostEnvironment hostingEnviroment)\n        {\n            Configuration = configuration;\n            HostingEnvironment = hostingEnviroment;\n        }\n\n        public IConfiguration Configuration { get; }\n        public IWebHostEnvironment HostingEnvironment { get; }\n\n        // This method gets called by the runtime. Use this method to add services to the container.\n        public void ConfigureServices(IServiceCollection services)\n        {\n            services.AddMemoryCache();\n            services.AddResponseCaching();\n\n            services.AddHealthChecks()\n                .AddCheck<PlatformConnectionHealthChecker>(\"Platform connection health\",\n                    failureStatus: HealthStatus.Unhealthy,\n                    tags: new[] { \"PlatformConnection\" });\n\n            services.Configure<StorefrontOptions>(Configuration.GetSection(\"VirtoCommerce\"));\n\n            //The IHttpContextAccessor service is not registered by default\n            //https://github.com/aspnet/Hosting/issues/793\n            services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();\n            services.AddSingleton<IWorkContextAccessor, WorkContextAccessor>();\n            services.AddSingleton<IUrlBuilder, UrlBuilder>();\n            services.AddSingleton<IStorefrontUrlBuilder, StorefrontUrlBuilder>();\n\n            services.AddSingleton<IStoreService, StoreService>();\n            services.AddSingleton<ICurrencyService, CurrencyService>();\n            services.AddSingleton<ISlugRouteService, SlugRouteService>();\n            services.AddSingleton<IMemberService, MemberService>();\n            services.AddSingleton<ISeoInfoService, SeoInfoService>();\n            services.AddSingleton<ISpaRouteService, SpaRouteService>();\n\n            services.AddSingleton<IStaticContentService, StaticContentService>();\n            services.AddSingleton<IMenuLinkListService, MenuLinkListServiceImpl>();\n            services.AddSingleton<IStaticContentItemFactory, StaticContentItemFactory>();\n            services.AddSingleton<IStaticContentLoaderFactory, StaticContentLoaderFactory>();\n            services.AddSingleton<IApiChangesWatcher, ApiChangesWatcher>();\n            services.AddSingleton<IBlobChangesWatcher, BlobChangesWatcher>();\n            services.AddTransient<AngularAntiforgeryCookieResultFilterAttribute>();\n            services.AddTransient<AnonymousUserForStoreAuthorizationFilter>();\n\n            //Register events framework dependencies\n            services.AddSingleton(new InProcessBus());\n            services.AddSingleton<IEventPublisher>(provider => provider.GetService<InProcessBus>());\n            services.AddSingleton<IHandlerRegistrar>(provider => provider.GetService<InProcessBus>());\n\n            // register features toggling agent\n            services.AddSingleton<IFeaturesAgent, FeaturesAgent>();\n\n            //Cache\n            var redisConnectionString = Configuration.GetConnectionString(\"RedisConnectionString\");\n            services.AddStorefrontCache(redisConnectionString, o =>\n            {\n                Configuration.GetSection(\"VirtoCommerce:Redis\").Bind(o);\n            });\n\n\n            //Register platform API clients\n            services.AddPlatformEndpoint(options =>\n            {\n                Configuration.GetSection(\"VirtoCommerce:Endpoint\").Bind(options);\n            });\n\n\n            services.AddSingleton<ICountriesService, FileSystemCountriesService>();\n            services.Configure<FileSystemCountriesOptions>(options =>\n            {\n                options.FilePath = HostingEnvironment.MapPath(\"~/countries.json\");\n            });\n\n            var contentConnectionString = BlobConnectionString.Parse(Configuration.GetConnectionString(\"ContentConnectionString\"));\n            if (contentConnectionString.Provider.EqualsInvariant(\"AzureBlobStorage\"))\n            {\n                var azureBlobOptions = new AzureBlobContentOptions();\n                Configuration.GetSection(\"VirtoCommerce:AzureBlobStorage\").Bind(azureBlobOptions);\n\n                services.AddAzureBlobContent(options =>\n                {\n                    options.Container = contentConnectionString.RootPath;\n                    options.ConnectionString = contentConnectionString.ConnectionString;\n                    options.PollForChanges = azureBlobOptions.PollForChanges;\n                    options.ChangesPollingInterval = azureBlobOptions.ChangesPollingInterval;\n                });\n            }\n            else\n            {\n                var fileSystemBlobOptions = new FileSystemBlobContentOptions();\n                Configuration.GetSection(\"VirtoCommerce:FileSystemBlobStorage\").Bind(fileSystemBlobOptions);\n                services.AddFileSystemBlobContent(options =>\n                {\n                    options.Path = HostingEnvironment.MapPath(contentConnectionString.RootPath);\n                });\n            }\n\n            //Identity overrides for use remote user storage\n            services.AddScoped<IUserStore<User>, UserStoreStub>();\n            services.AddScoped<IRoleStore<Role>, UserStoreStub>();\n            services.AddScoped<UserManager<User>, CustomUserManager>();\n            services.AddScoped<SignInManager<User>, CustomSignInManager>();\n\n            //Resource-based authorization that requires API permissions for some operations\n            services.AddSingleton<IAuthorizationHandler, CanImpersonateAuthorizationHandler>();\n            services.AddSingleton<IAuthorizationHandler, CanReadContentItemAuthorizationHandler>();\n            services.AddSingleton<IAuthorizationHandler, OnlyRegisteredUserAuthorizationHandler>();\n            services.AddSingleton<IAuthorizationHandler, AnonymousUserForStoreAuthorizationHandler>();\n            // register the AuthorizationPolicyProvider which dynamically registers authorization policies for each permission defined in the platform \n            services.AddSingleton<IAuthorizationPolicyProvider, PermissionAuthorizationPolicyProvider>();\n            //Storefront authorization handler for policy based on permissions \n            services.AddSingleton<IAuthorizationHandler, PermissionAuthorizationHandler>();\n            services.AddSingleton<IAuthorizationHandler, CanEditOrganizationResourceAuthorizationHandler>();\n\n            services.AddAuthorization(options =>\n            {\n                options.AddPolicy(CanImpersonateAuthorizationRequirement.PolicyName,\n                                policy => policy.Requirements.Add(new CanImpersonateAuthorizationRequirement()));\n                options.AddPolicy(CanReadContentItemAuthorizeRequirement.PolicyName,\n                                policy => policy.Requirements.Add(new CanReadContentItemAuthorizeRequirement()));\n                options.AddPolicy(CanEditOrganizationResourceAuthorizeRequirement.PolicyName,\n                                policy => policy.Requirements.Add(new CanEditOrganizationResourceAuthorizeRequirement()));\n                options.AddPolicy(OnlyRegisteredUserAuthorizationRequirement.PolicyName,\n                                policy => policy.Requirements.Add(new OnlyRegisteredUserAuthorizationRequirement()));\n                options.AddPolicy(AnonymousUserForStoreAuthorizationRequirement.PolicyName,\n                                policy => policy.Requirements.Add(new AnonymousUserForStoreAuthorizationRequirement()));\n            });\n\n            var auth = services.AddAuthentication();\n\n            var facebookSection = Configuration.GetSection(\"Authentication:Facebook\");\n            if (facebookSection.GetChildren().Any())\n            {\n                auth.AddFacebook(facebookOptions =>\n                {\n                    facebookSection.Bind(facebookOptions);\n                });\n            }\n            var googleSection = Configuration.GetSection(\"Authentication:Google\");\n            if (googleSection.GetChildren().Any())\n            {\n                auth.AddGoogle(googleOptions =>\n                {\n                    googleSection.Bind(googleOptions);\n                });\n            }\n            var githubSection = Configuration.GetSection(\"Authentication:Github\");\n            if (githubSection.GetChildren().Any())\n            {\n                auth.AddGitHub(GitHubAuthenticationOptions =>\n                {\n                    githubSection.Bind(GitHubAuthenticationOptions);\n                });\n            }\n            var stackexchangeSection = Configuration.GetSection(\"Authentication:Stackexchange\");\n\n            if (stackexchangeSection.GetChildren().Any())\n            {\n                auth.AddStackExchange(StackExchangeAuthenticationOptions =>\n                {\n                    stackexchangeSection.Bind(StackExchangeAuthenticationOptions);\n                });\n            }\n\n            services.Configure<IdentityOptions>(Configuration.GetSection(\"IdentityOptions\"));\n            services.AddIdentity<User, Role>(options => { }).AddDefaultTokenProviders();\n\n            services.AddScoped<CustomCookieAuthenticationEvents>();\n            services.ConfigureApplicationCookie(options =>\n            {\n                Configuration.GetSection(\"CookieAuthenticationOptions\").Bind(options);\n                options.EventsType = typeof(CustomCookieAuthenticationEvents);\n            });\n\n            services.Configure<CookiePolicyOptions>(options =>\n            {\n                // This lambda determines whether user consent for non-essential cookies is needed for a given request.\n                options.CheckConsentNeeded = context => true;\n                options.MinimumSameSitePolicy = SameSiteMode.Lax;\n            });\n            // The Tempdata provider cookie is not essential. Make it essential\n            // so Tempdata is functional when tracking is disabled.\n            services.Configure<CookieTempDataProviderOptions>(options =>\n            {\n                options.Cookie.IsEssential = true;\n            });\n            // Add Liquid view engine\n            services.AddLiquidViewEngine(options =>\n            {\n                Configuration.GetSection(\"VirtoCommerce:LiquidThemeEngine\").Bind(options);\n            });\n\n            services.AddAntiforgery(options =>\n            {\n                options.HeaderName = \"X-XSRF-TOKEN\";\n                options.SuppressXFrameOptionsHeader = true;\n            });\n            services.AddMvc(options =>\n            {\n                // Thus we disable anonymous users based on \"Store:AllowAnonymous\" store option\n                options.Filters.AddService<AnonymousUserForStoreAuthorizationFilter>();\n\n                options.CacheProfiles.Add(\"Default\", new CacheProfile()\n                {\n                    Duration = (int)TimeSpan.FromHours(1).TotalSeconds,\n                    VaryByHeader = \"host\"\n                });\n                options.CacheProfiles.Add(\"None\", new CacheProfile()\n                {\n                    NoStore = true,\n                    Location = ResponseCacheLocation.None\n                });\n\n                options.Filters.AddService(typeof(AngularAntiforgeryCookieResultFilterAttribute));\n\n                // To include only Api controllers to swagger document\n                options.Conventions.Add(new ApiExplorerApiControllersConvention());\n\n                // Use the routing logic of ASP.NET Core 2.1 or earlier:\n                options.EnableEndpointRouting = false;\n            }).AddNewtonsoftJson(options =>\n            {\n                options.SerializerSettings.ContractResolver = new DefaultContractResolver()\n                {\n                    NamingStrategy = new CamelCaseNamingStrategy()\n                };\n                options.SerializerSettings.DefaultValueHandling = DefaultValueHandling.Include;\n                options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;\n                options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;\n                options.SerializerSettings.MissingMemberHandling = MissingMemberHandling.Ignore;\n            });\n\n            services.AddFluentValidationAutoValidation();\n            services.AddFluentValidationClientsideAdapters();\n\n            // Register event handlers via reflection\n            services.RegisterAssembliesEventHandlers(typeof(Startup));\n\n            // The following line enables Application Insights telemetry collection.\n            services.AddApplicationInsightsTelemetry();\n            services.AddApplicationInsightsExtensions(Configuration);\n\n\n            // https://github.com/aspnet/HttpAbstractions/issues/315\n            // Changing the default html encoding options, to not encode non-Latin characters\n            services.Configure<WebEncoderOptions>(options => options.TextEncoderSettings = new TextEncoderSettings(UnicodeRanges.All));\n\n            services.Configure<HstsOptions>(options =>\n            {\n                options.IncludeSubDomains = true;\n                options.MaxAge = TimeSpan.FromDays(30);\n            });\n\n            // Register the Swagger generator, defining 1 or more Swagger documents\n            services.AddSwaggerGen(c =>\n            {\n                c.SwaggerDoc(\"v1\", new OpenApiInfo { Title = \"Storefront REST API documentation\", Version = \"v1\" });\n                c.IgnoreObsoleteProperties();\n                c.IgnoreObsoleteActions();\n                // To include 401 response type to actions that requires Authorization\n                c.OperationFilter<AuthResponsesOperationFilter>();\n                c.OperationFilter<ConsumeFromBodyFilter>();\n                c.OperationFilter<FileResponseTypeFilter>();\n                c.OperationFilter<OptionalParametersFilter>();\n                c.OperationFilter<ArrayInQueryParametersFilter>();\n                c.OperationFilter<FileUploadOperationFilter>();\n                c.SchemaFilter<EnumSchemaFilter>();\n\n                // Use method name as operation ID, i.e. ApiAccount.GetOrganization instead of /storefrontapi/account/organization (will be treated as just organization method)\n                c.CustomOperationIds(apiDesc => apiDesc.TryGetMethodInfo(out var methodInfo) ? methodInfo.Name : null);\n\n                // To avoid errors with repeating type names\n                c.CustomSchemaIds(type => (Attribute.GetCustomAttribute(type, typeof(SwaggerSchemaIdAttribute)) as SwaggerSchemaIdAttribute)?.Id ?? type.FriendlyId());\n            });\n            services.AddSwaggerGenNewtonsoftSupport();\n\n            services.AddResponseCompression();\n\n            services.AddProxy(builder => builder.AddHttpMessageHandler(sp => sp.GetService<AuthenticationHandlerFactory>().CreateAuthHandler()));\n\n            services.Configure<ProxyOptions>(options => options.WebSocketKeepAliveInterval = TimeSpan.FromSeconds(50));\n\n            services.AddSingleton<IGraphQLClient>(s =>\n            {\n                var platformEndpointOptions = s.GetRequiredService<IOptions<PlatformEndpointOptions>>().Value;\n                return new GraphQLHttpClient($\"{platformEndpointOptions.Url}graphql\", new NewtonsoftJsonSerializer());\n            });\n        }\n\n        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.\n        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n        {\n            app.UseForwardedHeaders();\n\n            if (env.IsDevelopment())\n            {\n                app.UseDeveloperExceptionPage();\n            }\n            else\n            {\n                app.UseExceptionHandler(\"/error/500\");\n                app.UseHsts();\n            }\n            // Do not write telemetry to debug output \n            TelemetryDebugWriter.IsTracingDisabled = true;\n\n            app.UseHealthChecks(\"/storefrontapi/health\", new HealthCheckOptions\n            {\n                ResponseWriter = async (context, report) =>\n                {\n                    context.Response.ContentType = \"application/json; charset=utf-8\";\n\n                    var reportJson =\n                        JsonConvert.SerializeObject(report.Entries, Formatting.Indented, new StringEnumConverter());\n                    await context.Response.WriteAsync(reportJson);\n                }\n            });\n\n            app.UseResponseCaching();\n\n            app.UseResponseCompression();\n\n            app.UseStaticFiles();\n            app.UseCookiePolicy();\n            app.UseRouting();\n\n            app.UseAuthentication();\n\n\n            // WorkContextBuildMiddleware must  always be registered first in  the Middleware chain\n            app.UseMiddleware<WorkContextBuildMiddleware>();\n            app.UseMiddleware<StoreMaintenanceMiddleware>();\n            app.UseMiddleware<NoLiquidThemeMiddleware>();\n\n            var mvcViewOptions = app.ApplicationServices.GetService<IOptions<MvcViewOptions>>().Value;\n            mvcViewOptions.ViewEngines.Add(app.ApplicationServices.GetService<ILiquidViewEngine>());\n\n            // Do not use status code pages for Api requests\n            app.UseWhen(context => !context.Request.Path.IsApi(), appBuilder =>\n            {\n                appBuilder.UseStatusCodePagesWithReExecute(\"/error/{0}\");\n            });\n\n            // Enable middleware to serve generated Swagger as a JSON endpoint.\n            app.UseSwagger(c => c.RouteTemplate = \"docs/{documentName}/docs.json\");\n\n            var rewriteOptions = new RewriteOptions();\n            // Load IIS url rewrite rules from external file\n            if (File.Exists(\"IISUrlRewrite.xml\"))\n            {\n                using var iisUrlRewriteStreamReader = File.OpenText(\"IISUrlRewrite.xml\");\n                rewriteOptions.AddIISUrlRewrite(iisUrlRewriteStreamReader);\n            }\n\n            var requireHttpsOptions = new RequireHttpsOptions();\n            Configuration.GetSection(\"VirtoCommerce:RequireHttps\").Bind(requireHttpsOptions);\n            if (requireHttpsOptions.Enabled)\n            {\n                rewriteOptions.AddRedirectToHttps(requireHttpsOptions.StatusCode, requireHttpsOptions.Port);\n            }\n            app.UseRewriter(rewriteOptions);\n            // Enable browser XSS protection\n            app.Use(async (context, next) =>\n            {\n                context.Response.Headers.XXSSProtection = \"1\";\n                await next();\n            });\n\n            var platformEndpointOptions = app.ApplicationServices.GetRequiredService<IOptions<PlatformEndpointOptions>>().Value;\n\n            var httpsPlatformGraphqlEndpoint = new Uri(platformEndpointOptions.Url, \"graphql\");\n            var wssPlatformGraphqlEndpoint = new UriBuilder(httpsPlatformGraphqlEndpoint)\n            {\n                Scheme = httpsPlatformGraphqlEndpoint.Scheme == Uri.UriSchemeHttps ? Uri.UriSchemeWss : Uri.UriSchemeWs\n            }.Uri;\n\n            app.UseWebSockets();\n            app.Map(\"/xapi/graphql\",\n                appInner =>\n                {\n                    appInner.UseWebSocketProxy(_ => wssPlatformGraphqlEndpoint, options => options.AddXForwardedHeaders());\n                    appInner.RunProxy(context => context.ForwardTo(httpsPlatformGraphqlEndpoint)\n                        .AddXForwardedHeaders()\n                        .Send());\n                });\n\n            app.UseWhen(\n                context => context.Request.Path.Value.EndsWith(\"/token\"),\n                appInner => appInner\n                    .RunProxy(context => context\n                        .ForwardTo(platformEndpointOptions.Url)\n                        .AddXForwardedHeaders()\n                        .Send()));\n\n            app.UseWhen(\n                context => context.Request.Path.StartsWithSegments(\"/api/files\"),\n                appInner => appInner\n                    .RunProxy(context => context\n                        .ForwardTo(platformEndpointOptions.Url)\n                        .AddXForwardedHeaders()\n                        .Send()));\n\n            // It will be good to rewrite endpoint routing as described here, but it's not easy to do:\n            // https://docs.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-3.1&tabs=visual-studio#routing-startup-code\n            app.UseMvc(routes =>\n            {\n                routes.MapSlugRoute(\"{*path}\", defaults: new { controller = \"Home\", action = \"Index\" });\n            });\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Views/Common/Maintenance.cshtml",
    "content": "\n<div id=\"feature\">\n    <div id=\"content\">\n        <h1>Under Maintenance</h1>\n        <p>\n            The server is under maintenance, please try again later.\n        </p>\n    </div>\n</div>\n\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Views/Common/NoTheme.cshtml",
    "content": "<div id=\"feature\">\n    <div id=\"content\">\n        <h1>Virto Commerce storefront has been successfully deployed</h1>\n        <p>Looks like you're missing a theme :(</p>\n        @if (Model != null)\n        {\n            <p>We looked for 'index.liquid' view in the following locations</p>\n            <ul>\n                @foreach (var searchedLocation in Model.SearchedLocations)\n                {\n                    <li>\n                        @searchedLocation\n                    </li>\n                }\n            </ul>\n        }\n        <p>It simple to fix: follow our instructions to download and correctly configure theme for your storefront.</p>\n        <a href=\"https://github.com/VirtoCommerce/vc-theme-b2b-vue\" class=\"button\" id=\"btnAdmin\">Let's start!</a>\n    </div>\n</div>\n\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Views/Error/404.cshtml",
    "content": "<div id=\"feature\">\n    <div id=\"content\">\n        <h1>404</h1>\n        <p>\n            Page not found\n        </p>\n    </div>\n</div>"
  },
  {
    "path": "VirtoCommerce.Storefront/Views/Error/500.cshtml",
    "content": "<div id=\"feature\">\n    <div id=\"content\">\n        <h1>500</h1>\n        <p>\n            Internal server error.\n        </p>\n    </div>\n</div>"
  },
  {
    "path": "VirtoCommerce.Storefront/Views/Error/AccessDenied.cshtml",
    "content": "<div id=\"feature\">\n    <div id=\"content\">\n        <h1>Access Denied</h1>\n        <p>\n           You do not have access to the page you request\n        </p>\n    </div>\n</div>"
  },
  {
    "path": "VirtoCommerce.Storefront/Views/Error/Error.cshtml",
    "content": "<div id=\"feature\">\n    <div id=\"content\">\n        <h1>Error.</h1>\n        <p>\n            An error occurred while processing your request.\n        </p>\n    </div>\n</div>"
  },
  {
    "path": "VirtoCommerce.Storefront/Views/Error/NoStore.cshtml",
    "content": "<div id=\"feature\">\n    <div id=\"content\">\n        <h1>Virto Commerce storefront has been successfully deployed</h1>\n        <p>\n            There's no store yet, but Virto Commerce Manager makes it simple to create a new one!\n        </p>\n        <a href=\"/admin\" class=\"button\" id=\"btnAdmin\">Let's start!</a>\n    </div>\n</div>\n\n\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Views/Shared/_Layout.cshtml",
    "content": "@inject Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet JavaScriptSnippet\n<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>@ViewData[\"Title\"] - VirtoCommerce.Storefront</title>\n\n    <environment include=\"Development\">\n        <link rel=\"stylesheet\" href=\"~/lib/bootstrap/dist/css/bootstrap.css\" />\n        <link rel=\"stylesheet\" href=\"~/css/site.css\" />\n    </environment>\n    <environment exclude=\"Development\">\n        <link rel=\"stylesheet\" href=\"https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css\"\n              asp-fallback-href=\"~/lib/bootstrap/dist/css/bootstrap.min.css\"\n              asp-fallback-test-class=\"sr-only\" asp-fallback-test-property=\"position\" asp-fallback-test-value=\"absolute\" />\n        <link rel=\"stylesheet\" href=\"~/css/site.min.css\" asp-append-version=\"true\" />\n    </environment>\n    @Html.Raw(JavaScriptSnippet.FullScript)\n</head>\n<body>\n\n    <div class=\"container body-content\">\n        @RenderBody()\n        <hr />\n        <footer>\n            <p>&copy; @DateTime.Now.Year - VirtoCommerce.Storefront</p>\n        </footer>\n    </div>\n\n    <environment include=\"Development\">\n        <script src=\"~/lib/jquery/dist/jquery.js\"></script>\n        <script src=\"~/lib/bootstrap/dist/js/bootstrap.js\"></script>\n        <script src=\"~/js/site.js\" asp-append-version=\"true\"></script>\n    </environment>\n    <environment exclude=\"Development\">\n        <script src=\"https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js\"\n                asp-fallback-src=\"~/lib/jquery/dist/jquery.min.js\"\n                asp-fallback-test=\"window.jQuery\"\n                crossorigin=\"anonymous\"\n                integrity=\"sha384-K+ctZQ+LL8q6tP7I94W+qzQsfRV2a+AfHIi9k8z8l9ggpc8X+Ytst4yBo/hH+8Fk\">\n        </script>\n        <script src=\"https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js\"\n                asp-fallback-src=\"~/lib/bootstrap/dist/js/bootstrap.min.js\"\n                asp-fallback-test=\"window.jQuery && window.jQuery.fn && window.jQuery.fn.modal\"\n                crossorigin=\"anonymous\"\n                integrity=\"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa\">\n        </script>\n        <script src=\"~/js/site.min.js\" asp-append-version=\"true\"></script>\n    </environment>\n\n    @RenderSection(\"Scripts\", required: false)\n</body>\n</html>\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Views/Shared/_ValidationScriptsPartial.cshtml",
    "content": "<environment include=\"Development\">\n    <script src=\"~/lib/jquery-validation/dist/jquery.validate.js\"></script>\n    <script src=\"~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js\"></script>\n</environment>\n<environment exclude=\"Development\">\n    <script src=\"https://ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min.js\"\n            asp-fallback-src=\"~/lib/jquery-validation/dist/jquery.validate.min.js\"\n            asp-fallback-test=\"window.jQuery && window.jQuery.validator\"\n            crossorigin=\"anonymous\"\n            integrity=\"sha384-Fnqn3nxp3506LP/7Y3j/25BlWeA3PXTyT1l78LjECcPaKCV12TsZP7yyMxOe/G/k\">\n    </script>\n    <script src=\"https://ajax.aspnetcdn.com/ajax/jquery.validation.unobtrusive/3.2.6/jquery.validate.unobtrusive.min.js\"\n            asp-fallback-src=\"~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js\"\n            asp-fallback-test=\"window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive\"\n            crossorigin=\"anonymous\"\n            integrity=\"sha384-JrXK+k53HACyavUKOsL+NkmSesD2P+73eDMrbTtTk0h4RmOF8hF8apPlkp26JlyH\">\n    </script>\n</environment>\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Views/_ViewImports.cshtml",
    "content": "@using VirtoCommerce.Storefront\n@using VirtoCommerce.Storefront.Models\n@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers\n"
  },
  {
    "path": "VirtoCommerce.Storefront/Views/_ViewStart.cshtml",
    "content": "@{\n    Layout = \"_Layout\";\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/VirtoCommerce.Storefront.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n  <PropertyGroup>\n    <TargetFramework>net8.0</TargetFramework>\n    <DockerComposeProjectPath>..\\docker-compose.dcproj</DockerComposeProjectPath>\n    <UserSecretsId>0cd403c4-2cd0-42b3-987a-02900f4a683e</UserSecretsId>\n    <Description>The storefront implementation of the Virto Commerce platform.</Description>\n    <PackageLicenseUrl>https://virtocommerce.com/open-source-license</PackageLicenseUrl>\n    <PackageProjectUrl>https://github.com/VirtoCommerce/vc-storefront</PackageProjectUrl>\n    <RepositoryUrl>https://github.com/VirtoCommerce/vc-storefront</RepositoryUrl>\n    <PackageIconUrl>https://virtocommerce.com/themes/assets/logo.jpg</PackageIconUrl>\n    <PackageReleaseNotes>\n    </PackageReleaseNotes>\n    <TypeScriptToolsVersion>3.1</TypeScriptToolsVersion>\n    <!--Remove later when Azure apps has been updated-->\n    <!--<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>-->\n  </PropertyGroup>\n  <PropertyGroup>\n    <GenerateDocumentationFile>true</GenerateDocumentationFile>\n    <NoWarn>1701;1702;1591;1573;1570</NoWarn>\n  </PropertyGroup>\n  <ItemGroup>\n    <Compile Remove=\"JsonConverters\\**\" />\n    <Compile Remove=\"wwwroot\\cms-content\\**\" />\n    <Content Remove=\"JsonConverters\\**\" />\n    <Content Remove=\"wwwroot\\cms-content\\**\" />\n    <EmbeddedResource Remove=\"JsonConverters\\**\" />\n    <None Remove=\"JsonConverters\\**\" />\n    <Content Update=\"wwwroot\\cms-content\\**\" CopyToPublishDirectory=\"Never\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"IISUrlRewrite.xml\">\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\n    </Content>\n  </ItemGroup>\n  <ItemGroup>\n    <PackageReference Include=\"AspNet.Security.OAuth.GitHub\" Version=\"8.0.0\" />\n    <PackageReference Include=\"AspNet.Security.OAuth.StackExchange\" Version=\"8.0.0\" />\n    <PackageReference Include=\"GraphQL.Client\" Version=\"6.0.3\" />\n    <PackageReference Include=\"GraphQL.Client.Serializer.Newtonsoft\" Version=\"6.0.3\" />\n    <PackageReference Include=\"IdentityModel\" Version=\"6.2.0\" />\n    <PackageReference Include=\"FluentValidation\" Version=\"11.8.1\" />\n    <PackageReference Include=\"FluentValidation.AspNetCore\" Version=\"11.3.0\" />\n    <PackageReference Include=\"Markdig\" Version=\"0.36.2\" />\n    <PackageReference Include=\"Microsoft.ApplicationInsights.AspNetCore\" Version=\"2.22.0\" />\n    <PackageReference Include=\"Microsoft.ApplicationInsights.PerfCounterCollector\" Version=\"2.22.0\" />\n    <PackageReference Include=\"Microsoft.ApplicationInsights.SnapshotCollector\" Version=\"1.4.6\" />\n    <PackageReference Include=\"Microsoft.AspNetCore.Authentication.Facebook\" Version=\"8.0.3\" />\n    <PackageReference Include=\"Microsoft.AspNetCore.Authentication.Google\" Version=\"8.0.3\" />\n    <PackageReference Include=\"Microsoft.AspNetCore.Mvc.NewtonsoftJson\" Version=\"8.0.0\" />\n    <PackageReference Include=\"Microsoft.Extensions.Logging.AzureAppServices\" Version=\"8.0.3\" />\n    <PackageReference Include=\"Microsoft.Rest.ClientRuntime\" Version=\"2.3.24\" />\n    <PackageReference Include=\"Microsoft.SyndicationFeed.ReaderWriter\" Version=\"1.0.2\" />\n    <PackageReference Include=\"MimeTypes\" Version=\"2.5.1\">\n      <PrivateAssets>all</PrivateAssets>\n      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>\n    </PackageReference>\n    <PackageReference Include=\"Nito.AsyncEx\" Version=\"5.1.2\" />\n    <PackageReference Include=\"PagedList.Core\" Version=\"1.17.4\" />\n    <PackageReference Include=\"Polly\" Version=\"8.2.0\" />\n    <PackageReference Include=\"ProxyKit\" Version=\"2.3.4\" />\n    <PackageReference Include=\"Scrutor\" Version=\"4.2.2\" />\n    <PackageReference Include=\"StackExchange.Redis\" Version=\"2.7.33\" />\n    <PackageReference Include=\"Swashbuckle.AspNetCore.Newtonsoft\" Version=\"6.5.0\" />\n    <PackageReference Include=\"Swashbuckle.AspNetCore.Swagger\" Version=\"6.5.0\" />\n    <PackageReference Include=\"Swashbuckle.AspNetCore.SwaggerGen\" Version=\"6.5.0\" />\n    <PackageReference Include=\"Swashbuckle.AspNetCore.SwaggerUI\" Version=\"6.5.0\" />\n    <PackageReference Include=\"VirtoCommerce.Tools\" Version=\"3.800.0\" />\n    <PackageReference Include=\"WindowsAzure.Storage\" Version=\"9.3.3\" />\n  </ItemGroup>\n  <!--Workaround for vulnerable transitive packages-->\n  <ItemGroup>\n    <PackageReference Include=\"System.Net.Http\" Version=\"4.3.4\" />\n    <PackageReference Include=\"System.Text.RegularExpressions\" Version=\"4.3.1\" />\n    <PackageReference Include=\"YamlDotNet\" Version=\"15.1.2\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\VirtoCommerce.LiquidThemeEngine\\VirtoCommerce.LiquidThemeEngine.csproj\" />\n    <ProjectReference Include=\"..\\VirtoCommerce.Storefront.Model\\VirtoCommerce.Storefront.Model.csproj\" />\n  </ItemGroup>\n  <ItemGroup>\n    <WCFMetadata Include=\"Connected Services\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Folder Include=\"wwwroot\\cms-content\\Themes\\Electronics\\default\\\" />\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "VirtoCommerce.Storefront/appsettings.Development.json",
    "content": "{ \n  \"Logging\": {\n    \"IncludeScopes\": false,\n    \"LogLevel\": {\n      \"Default\": \"Debug\",\n      \"System\": \"Information\",\n      \"Microsoft\": \"Information\"\n    }\n  },\n  \"VirtoCommerce\": {\n    \"Endpoint\": {    \n      \"RequestTimeout\": \"0:5:00\"\n    },\n    \"LiquidThemeEngine\": {\n      \"RethrowLiquidRenderErrors\": true\n    }\n  }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/appsettings.Production.json",
    "content": "{\n  \"CookieAuthenticationOptions\": {\n    \"ExpireTimeSpan\": \"30.00:00:00\"\n  }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/appsettings.json",
    "content": "{\n  \"ConnectionStrings\": {\n    \"ContentConnectionString\": \"provider=LocalStorage;rootPath=~/cms-content\"\n    // Set this connection string to switch the cache to hybrid mode. The Redis server will keep the local memory cache of multiple instances in a consistent state.\n    //\"RedisConnectionString\": \"127.0.0.1:6379,ssl=False\"\n  },\n  \"VirtoCommerce\": {\n    \"DefaultStore\": \"B2B-store\",\n    \"StoreUrls\": {\n      // Define  mapping of  concrete stores with public urls in this section\n      //\"{store id}\":\"{store public url}\"\n    },\n    \"CacheEnabled\": \"true\",\n    \"CacheSlidingExpiration\": \"0:10:0\",\n    //The setting  responds of frequency storefront requests to platform /api/changes/lastmodifieddate to get the latest timestamps of any data changes and use it for the cached data expiration,\n    //any data changes in the platform side will invalidate all data cache in storefront because of hard to implement graceful cache invalidation for dependencies\n    \"ChangesPollingInterval\": \"0:0:15\",\n    \"Redis\": {\n      // The name of the channel. All instances with the same ChannelName will only receive events within their own channel.\n      \"ChannelName\": \"VirtoCommerceStorefrontChannel\",\n      \"BusRetryCount\": 3\n    },\n    \"PageSizeMaxValue\": 100,\n    \"Endpoint\": {\n      \"Url\": \"https://localhost:5001/\",\n      // Use AppId and SecretKey for Platform API authentication (has higher priority than UserName/Password)\n      //\"AppId\": \"27e0d789f12641049bd0e939185b4fd2\",\n      //\"SecretKey\": \"34f0a3c12c9dbb59b63b5fece955b7b2b9a3b20f84370cba1524dd5c53503a2e2cb733536ecf7ea1e77319a47084a3a2c9d94d36069a432ecc73b72aeba6ea78\",\n\n      // Use client credential flow for Platform API authentication\n      //\"ClientId\": \"\",\n      //\"ClientSecret\": \"\", \n\n      // Use UserName and Password for Platform API authentication\n      \"UserName\": \"admin\",\n      \"Password\": \"store\",\n      \"RequestTimeout\": \"0:0:30\"\n    },\n    \"LiquidThemeEngine\": {\n      \"RethrowLiquidRenderErrors\": false,\n      // The path to the base theme that will be used to discover the theme resources not found by the path of theme for current store.\n      // This parameter can be used for theme inheritance logic.\n      // Example values: Electronics/default_theme -> wwwroot/cms-content/Themes/Electronics/default_theme\n      \"BaseThemePath\": \"\",\n      // Set to true if you want to merge current theme settings with base theme settings instead of placement\n      \"MergeBaseSettings\": false\n    },\n    \"RequireHttps\": {\n      \"Enabled\": false,\n      \"StatusCode\": \"308\",\n      \"Port\": \"443\"\n    },\n    \"AzureBlobStorage\": {\n      \"PollForChanges\": true,\n      \"ChangesPollingInterval\": \"0:0:15\"\n    },\n    // This option sets how notification is delivered in reset password workflow. Possible values: \"Email\", \"Phone\".\n    \"ResetPasswordNotificationGateway\": \"Email\",\n    // This option sets how notification is delivered in two factor authentication workflow. Possible values: \"Email\", \"Phone\".\n    \"TwoFactorAuthenticationNotificationGateway\": \"Phone\"\n  },\n  \"CookieAuthenticationOptions\": {\n    \"Cookie\": {\n      \"HttpOnly\": true\n    },\n    \"ExpireTimeSpan\": \"00:30:00\",\n    \"LoginPath\": \"/sign-in\",\n    \"LogoutPath\": \"/sign-out\",\n    \"AccessDeniedPath\": \"/error/accessdenied\",\n    \"SlidingExpiration\": true\n  },\n  \"IdentityOptions\": {\n    \"Password\": {\n      \"RequiredLength\": 8,\n      \"RequireDigit\": false,\n      \"RequireNonAlphanumeric\": false\n    },\n    \"Lockout\": {\n      \"DefaultLockoutTimeSpan\": \"0:15:0\"\n    }\n  },\n  \"SnapshotCollectorConfiguration\": {\n    \"IsEnabledInDeveloperMode\": false,\n    \"ThresholdForSnapshotting\": 1,\n    \"MaximumSnapshotsRequired\": 3,\n    \"MaximumCollectionPlanSize\": 50,\n    \"ReconnectInterval\": \"00:15:00\",\n    \"ProblemCounterResetInterval\": \"1.00:00:00\",\n    \"SnapshotsPerTenMinutesLimit\": 1,\n    \"SnapshotsPerDayLimit\": 30,\n    \"SnapshotInLowPriorityThread\": true,\n    \"ProvideAnonymousTelemetry\": true,\n    \"FailedRequestLimit\": 3\n  }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/bower.json",
    "content": "{\n  \"name\": \"asp.net\",\n  \"private\": true,\n  \"dependencies\": {\n    \"bootstrap\": \"3.3.7\",\n    \"jquery\": \"2.2.0\",\n    \"jquery-validation\": \"1.14.0\",\n    \"jquery-validation-unobtrusive\": \"3.2.6\"\n  }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/bundleconfig.json",
    "content": "// Configure bundling and minification for the project.\n// More info at https://go.microsoft.com/fwlink/?LinkId=808241\n[\n  {\n    \"outputFileName\": \"wwwroot/css/site.min.css\",\n    // An array of relative input file paths. Globbing patterns supported\n    \"inputFiles\": [\n      \"wwwroot/css/site.css\"\n    ]\n  },\n  {\n    \"outputFileName\": \"wwwroot/js/site.min.js\",\n    \"inputFiles\": [\n      \"wwwroot/js/site.js\"\n    ],\n    // Optionally specify minification options\n    \"minify\": {\n      \"enabled\": true,\n      \"renameLocals\": true\n    },\n    // Optionally generate .map file\n    \"sourceMap\": false\n  }\n]\n"
  },
  {
    "path": "VirtoCommerce.Storefront/bundleconfig.json.bindings",
    "content": "produceoutput=true"
  },
  {
    "path": "VirtoCommerce.Storefront/web.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<configuration>\r\n  <!-- To customize the asp.net core module uncomment and edit the following section. \r\n  For more info see https://go.microsoft.com/fwlink/?linkid=838655 -->\r\n  <system.webServer>\r\n    <!--http://hovercraft.ie/asp-net-core-web-api-put-delete-methods-not-allowed-405-error/-->\r\n    <modules runAllManagedModulesForAllRequests=\"false\">\r\n      <remove name=\"WebDAVModule\" />\r\n    </modules>\r\n    <handlers>\r\n      <remove name=\"aspNetCore\" />\r\n      <add name=\"aspNetCore\" path=\"*\" verb=\"*\" modules=\"AspNetCoreModuleV2\" resourceType=\"Unspecified\" />\r\n    </handlers>\r\n    <aspNetCore processPath=\"%LAUNCHER_PATH%\" arguments=\"%LAUNCHER_ARGS%\" stdoutLogEnabled=\"false\" stdoutLogFile=\".\\logs\\stdout\" hostingModel=\"inprocess\">\r\n      <environmentVariables>\r\n        <environmentVariable name=\"COMPLUS_ForceENC\" value=\"1\" />\r\n        <environmentVariable name=\"ASPNETCORE_ENVIRONMENT\" value=\"Development\" />\r\n      </environmentVariables>\r\n    </aspNetCore>\r\n  </system.webServer>\r\n</configuration>\r\n"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/countries.json",
    "content": "{\n  \"Canada\": {\n    \"label\": \"Province\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Province\",\n    \"provinces\": [\n      \"Alberta\",\n      \"British Columbia\",\n      \"Manitoba\",\n      \"New Brunswick\",\n      \"Newfoundland\",\n      \"Northwest Territories\",\n      \"Nova Scotia\",\n      \"Nunavut\",\n      \"Ontario\",\n      \"Prince Edward Island\",\n      \"Quebec\",\n      \"Saskatchewan\",\n      \"Yukon\"\n    ],\n    \"province_labels\": {\n      \"Alberta\": \"Alberta\",\n      \"British Columbia\": \"British Columbia\",\n      \"Manitoba\": \"Manitoba\",\n      \"New Brunswick\": \"New Brunswick\",\n      \"Newfoundland\": \"Newfoundland\",\n      \"Northwest Territories\": \"Northwest Territories\",\n      \"Nova Scotia\": \"Nova Scotia\",\n      \"Nunavut\": \"Nunavut\",\n      \"Ontario\": \"Ontario\",\n      \"Prince Edward Island\": \"Prince Edward Island\",\n      \"Quebec\": \"Quebec\",\n      \"Saskatchewan\": \"Saskatchewan\",\n      \"Yukon\": \"Yukon\"\n    },\n    \"province_codes\": {\n      \"Alberta\": \"AB\",\n      \"British Columbia\": \"BC\",\n      \"Manitoba\": \"MB\",\n      \"New Brunswick\": \"NB\",\n      \"Newfoundland\": \"NL\",\n      \"Northwest Territories\": \"NT\",\n      \"Nova Scotia\": \"NS\",\n      \"Nunavut\": \"NU\",\n      \"Ontario\": \"ON\",\n      \"Prince Edward Island\": \"PE\",\n      \"Quebec\": \"QC\",\n      \"Saskatchewan\": \"SK\",\n      \"Yukon\": \"YT\"\n    },\n    \"Code2\": \"CA\",\n    \"Code3\": \"CAN\"\n  },\n  \"United States\": {\n    \"label\": \"State\",\n    \"zip_label\": \"Zip code\",\n    \"zip_placeholder\": \"Zip code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"State\",\n    \"provinces\": [\n      \"Alabama\",\n      \"Alaska\",\n      \"American Samoa\",\n      \"Arizona\",\n      \"Arkansas\",\n      \"California\",\n      \"Colorado\",\n      \"Connecticut\",\n      \"Delaware\",\n      \"Federated States of Micronesia\",\n      \"Florida\",\n      \"Georgia\",\n      \"Guam\",\n      \"Hawaii\",\n      \"Idaho\",\n      \"Illinois\",\n      \"Indiana\",\n      \"Iowa\",\n      \"Kansas\",\n      \"Kentucky\",\n      \"Louisiana\",\n      \"Maine\",\n      \"Marshall Islands\",\n      \"Maryland\",\n      \"Massachusetts\",\n      \"Michigan\",\n      \"Minnesota\",\n      \"Mississippi\",\n      \"Missouri\",\n      \"Montana\",\n      \"Nebraska\",\n      \"Nevada\",\n      \"New Hampshire\",\n      \"New Jersey\",\n      \"New Mexico\",\n      \"New York\",\n      \"North Carolina\",\n      \"North Dakota\",\n      \"Northern Mariana Islands\",\n      \"Ohio\",\n      \"Oklahoma\",\n      \"Oregon\",\n      \"Palau\",\n      \"Pennsylvania\",\n      \"Puerto Rico\",\n      \"Rhode Island\",\n      \"South Carolina\",\n      \"South Dakota\",\n      \"Tennessee\",\n      \"Texas\",\n      \"Utah\",\n      \"Vermont\",\n      \"Virginia\",\n      \"Washington\",\n      \"Washington DC\",\n      \"West Virginia\",\n      \"Wisconsin\",\n      \"Wyoming\",\n      \"Virgin Islands\",\n      \"Armed Forces Americas\",\n      \"Armed Forces Europe\",\n      \"Armed Forces Pacific\"\n    ],\n    \"province_labels\": {\n      \"Alabama\": \"Alabama\",\n      \"Alaska\": \"Alaska\",\n      \"American Samoa\": \"American Samoa\",\n      \"Arizona\": \"Arizona\",\n      \"Arkansas\": \"Arkansas\",\n      \"Armed Forces Americas\": \"Armed Forces Americas\",\n      \"Armed Forces Europe\": \"Armed Forces Europe\",\n      \"Armed Forces Pacific\": \"Armed Forces Pacific\",\n      \"California\": \"California\",\n      \"Colorado\": \"Colorado\",\n      \"Connecticut\": \"Connecticut\",\n      \"Delaware\": \"Delaware\",\n      \"Federated States of Micronesia\": \"Federated States of Micronesia\",\n      \"Florida\": \"Florida\",\n      \"Georgia\": \"Georgia\",\n      \"Guam\": \"Guam\",\n      \"Hawaii\": \"Hawaii\",\n      \"Idaho\": \"Idaho\",\n      \"Illinois\": \"Illinois\",\n      \"Indiana\": \"Indiana\",\n      \"Iowa\": \"Iowa\",\n      \"Kansas\": \"Kansas\",\n      \"Kentucky\": \"Kentucky\",\n      \"Louisiana\": \"Louisiana\",\n      \"Maine\": \"Maine\",\n      \"Marshall Islands\": \"Marshall Islands\",\n      \"Maryland\": \"Maryland\",\n      \"Massachusetts\": \"Massachusetts\",\n      \"Michigan\": \"Michigan\",\n      \"Minnesota\": \"Minnesota\",\n      \"Mississippi\": \"Mississippi\",\n      \"Missouri\": \"Missouri\",\n      \"Montana\": \"Montana\",\n      \"Nebraska\": \"Nebraska\",\n      \"Nevada\": \"Nevada\",\n      \"New Hampshire\": \"New Hampshire\",\n      \"New Jersey\": \"New Jersey\",\n      \"New Mexico\": \"New Mexico\",\n      \"New York\": \"New York\",\n      \"North Carolina\": \"North Carolina\",\n      \"North Dakota\": \"North Dakota\",\n      \"Northern Mariana Islands\": \"Northern Mariana Islands\",\n      \"Ohio\": \"Ohio\",\n      \"Oklahoma\": \"Oklahoma\",\n      \"Oregon\": \"Oregon\",\n      \"Palau\": \"Palau\",\n      \"Pennsylvania\": \"Pennsylvania\",\n      \"Puerto Rico\": \"Puerto Rico\",\n      \"Rhode Island\": \"Rhode Island\",\n      \"South Carolina\": \"South Carolina\",\n      \"South Dakota\": \"South Dakota\",\n      \"Tennessee\": \"Tennessee\",\n      \"Texas\": \"Texas\",\n      \"Utah\": \"Utah\",\n      \"Vermont\": \"Vermont\",\n      \"Virgin Islands\": \"Virgin Islands\",\n      \"Virginia\": \"Virginia\",\n      \"Washington\": \"Washington\",\n      \"Washington DC\": \"Washington DC\",\n      \"West Virginia\": \"West Virginia\",\n      \"Wisconsin\": \"Wisconsin\",\n      \"Wyoming\": \"Wyoming\"\n    },\n    \"province_codes\": {\n      \"Alabama\": \"AL\",\n      \"Alaska\": \"AK\",\n      \"American Samoa\": \"AS\",\n      \"Arizona\": \"AZ\",\n      \"Arkansas\": \"AR\",\n      \"California\": \"CA\",\n      \"Colorado\": \"CO\",\n      \"Connecticut\": \"CT\",\n      \"Delaware\": \"DE\",\n      \"Federated States of Micronesia\": \"FM\",\n      \"Florida\": \"FL\",\n      \"Georgia\": \"GA\",\n      \"Guam\": \"GU\",\n      \"Hawaii\": \"HI\",\n      \"Idaho\": \"ID\",\n      \"Illinois\": \"IL\",\n      \"Indiana\": \"IN\",\n      \"Iowa\": \"IA\",\n      \"Kansas\": \"KS\",\n      \"Kentucky\": \"KY\",\n      \"Louisiana\": \"LA\",\n      \"Maine\": \"ME\",\n      \"Marshall Islands\": \"MH\",\n      \"Maryland\": \"MD\",\n      \"Massachusetts\": \"MA\",\n      \"Michigan\": \"MI\",\n      \"Minnesota\": \"MN\",\n      \"Mississippi\": \"MS\",\n      \"Missouri\": \"MO\",\n      \"Montana\": \"MT\",\n      \"Nebraska\": \"NE\",\n      \"Nevada\": \"NV\",\n      \"New Hampshire\": \"NH\",\n      \"New Jersey\": \"NJ\",\n      \"New Mexico\": \"NM\",\n      \"New York\": \"NY\",\n      \"North Carolina\": \"NC\",\n      \"North Dakota\": \"ND\",\n      \"Northern Mariana Islands\": \"MP\",\n      \"Ohio\": \"OH\",\n      \"Oklahoma\": \"OK\",\n      \"Oregon\": \"OR\",\n      \"Palau\": \"PW\",\n      \"Pennsylvania\": \"PA\",\n      \"Puerto Rico\": \"PR\",\n      \"Rhode Island\": \"RI\",\n      \"South Carolina\": \"SC\",\n      \"South Dakota\": \"SD\",\n      \"Tennessee\": \"TN\",\n      \"Texas\": \"TX\",\n      \"Utah\": \"UT\",\n      \"Vermont\": \"VT\",\n      \"Virginia\": \"VA\",\n      \"Washington\": \"WA\",\n      \"Washington DC\": \"DC\",\n      \"West Virginia\": \"WV\",\n      \"Wisconsin\": \"WI\",\n      \"Wyoming\": \"WY\",\n      \"Virgin Islands\": \"VI\",\n      \"Armed Forces Americas\": \"AA\",\n      \"Armed Forces Europe\": \"AE\",\n      \"Armed Forces Pacific\": \"AP\"\n    },\n    \"Code2\": \"US\",\n    \"Code3\": \"USA\"\n  },\n  \"United Kingdom\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GB\",\n    \"Code3\": \"GBR\"\n  },\n  \"Albania\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"AL\",\n    \"Code3\": \"ALB\"\n  },\n  \"Algeria\": {\n    \"label\": \"Province\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Province\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"DZ\",\n    \"Code3\": \"DZA\"\n  },\n  \"Andorra\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"AD\",\n    \"Code3\": \"AND\"\n  },\n  \"Angola\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"AO\",\n    \"Code3\": \"AGO\"\n  },\n  \"Argentina\": {\n    \"label\": \"Province\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Province\",\n    \"provinces\": [\n      \"Buenos Aires City\",\n      \"Buenos Aires\",\n      \"Catamarca\",\n      \"Chaco\",\n      \"Chobut\",\n      \"Córdoba\",\n      \"Corrientes\",\n      \"Ente Ríos\",\n      \"Formosa\",\n      \"Jujuy\",\n      \"La Pampa\",\n      \"La Rioja\",\n      \"Mendoza\",\n      \"Misiones\",\n      \"Neuquén\",\n      \"Río Negro\",\n      \"Salta\",\n      \"San Juan\",\n      \"San Luis\",\n      \"Santa Cruz\",\n      \"Santa Fe\",\n      \"Santiago Del Estero\",\n      \"Tierra del Fuego\",\n      \"Tucumán\"\n    ],\n    \"province_labels\": {\n      \"Buenos Aires\": \"Buenos Aires\",\n      \"Buenos Aires City\": \"Buenos Aires City\",\n      \"Catamarca\": \"Catamarca\",\n      \"Chaco\": \"Chaco\",\n      \"Chobut\": \"Chobut\",\n      \"Córdoba\": \"Córdoba\",\n      \"Corrientes\": \"Corrientes\",\n      \"Ente Ríos\": \"Ente Ríos\",\n      \"Formosa\": \"Formosa\",\n      \"Jujuy\": \"Jujuy\",\n      \"La Pampa\": \"La Pampa\",\n      \"La Rioja\": \"La Rioja\",\n      \"Mendoza\": \"Mendoza\",\n      \"Misiones\": \"Misiones\",\n      \"Neuquén\": \"Neuquén\",\n      \"Río Negro\": \"Río Negro\",\n      \"Salta\": \"Salta\",\n      \"San Juan\": \"San Juan\",\n      \"San Luis\": \"San Luis\",\n      \"Santa Cruz\": \"Santa Cruz\",\n      \"Santa Fe\": \"Santa Fe\",\n      \"Santiago Del Estero\": \"Santiago Del Estero\",\n      \"Tierra del Fuego\": \"Tierra del Fuego\",\n      \"Tucumán\": \"Tucumán\"\n    },\n    \"province_codes\": {\n      \"Buenos Aires City\": \"C\",\n      \"Buenos Aires\": \"B\",\n      \"Catamarca\": \"K\",\n      \"Chaco\": \"H\",\n      \"Chobut\": \"U\",\n      \"Córdoba\": \"X\",\n      \"Corrientes\": \"W\",\n      \"Ente Ríos\": \"E\",\n      \"Formosa\": \"P\",\n      \"Jujuy\": \"Y\",\n      \"La Pampa\": \"L\",\n      \"La Rioja\": \"F\",\n      \"Mendoza\": \"M\",\n      \"Misiones\": \"N\",\n      \"Neuquén\": \"Q\",\n      \"Río Negro\": \"R\",\n      \"Salta\": \"A\",\n      \"San Juan\": \"J\",\n      \"San Luis\": \"D\",\n      \"Santa Cruz\": \"Z\",\n      \"Santa Fe\": \"S\",\n      \"Santiago Del Estero\": \"G\",\n      \"Tierra del Fuego\": \"V\",\n      \"Tucumán\": \"T\"\n    },\n    \"Code2\": \"AR\",\n    \"Code3\": \"ARG\"\n  },\n  \"Armenia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"AM\",\n    \"Code3\": \"ARM\"\n  },\n  \"Aruba\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"AW\",\n    \"Code3\": \"ABW\"\n  },\n  \"Antigua And Barbuda\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"AG\",\n    \"Code3\": \"ATG\"\n  },\n  \"Australia\": {\n    \"label\": \"State/Territory\",\n    \"zip_label\": \"Postcode\",\n    \"zip_placeholder\": \"Postcode\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"State/Territory\",\n    \"provinces\": [\n      \"Australian Capital Territory\",\n      \"New South Wales\",\n      \"Northern Territory\",\n      \"Queensland\",\n      \"South Australia\",\n      \"Tasmania\",\n      \"Victoria\",\n      \"Western Australia\"\n    ],\n    \"province_labels\": {\n      \"Australian Capital Territory\": \"Australian Capital Territory\",\n      \"New South Wales\": \"New South Wales\",\n      \"Northern Territory\": \"Northern Territory\",\n      \"Queensland\": \"Queensland\",\n      \"South Australia\": \"South Australia\",\n      \"Tasmania\": \"Tasmania\",\n      \"Victoria\": \"Victoria\",\n      \"Western Australia\": \"Western Australia\"\n    },\n    \"province_codes\": {\n      \"Australian Capital Territory\": \"ACT\",\n      \"New South Wales\": \"NSW\",\n      \"Northern Territory\": \"NT\",\n      \"Queensland\": \"QLD\",\n      \"South Australia\": \"SA\",\n      \"Tasmania\": \"TAS\",\n      \"Victoria\": \"VIC\",\n      \"Western Australia\": \"WA\"\n    },\n    \"Code2\": \"AU\",\n    \"Code3\": \"AUS\"\n  },\n  \"Austria\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"AT\",\n    \"Code3\": \"AUT\"\n  },\n  \"Azerbaijan\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"AZ\",\n    \"Code3\": \"AZE\"\n  },\n  \"Bangladesh\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BD\",\n    \"Code3\": \"BGD\"\n  },\n  \"Bahamas\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BS\",\n    \"Code3\": \"BHS\"\n  },\n  \"Bahrain\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BH\",\n    \"Code3\": \"BHR\"\n  },\n  \"Barbados\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BB\",\n    \"Code3\": \"BRB\"\n  },\n  \"Belarus\": {\n    \"label\": \"Province\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Province\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BY\",\n    \"Code3\": \"BLR\"\n  },\n  \"Belgium\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BE\",\n    \"Code3\": \"BEL\"\n  },\n  \"Belize\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BZ\",\n    \"Code3\": \"BLZ\"\n  },\n  \"Bermuda\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BM\",\n    \"Code3\": \"BMU\"\n  },\n  \"Bhutan\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BT\",\n    \"Code3\": \"BTN\"\n  },\n  \"Bolivia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BO\",\n    \"Code3\": \"BOL\"\n  },\n  \"Bosnia And Herzegovina\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BA\",\n    \"Code3\": \"BIH\"\n  },\n  \"Botswana\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BW\",\n    \"Code3\": \"BWA\"\n  },\n  \"Brazil\": {\n    \"label\": \"State\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"State\",\n    \"provinces\": [\n      \"Acre\",\n      \"Alagoas\",\n      \"Amapá\",\n      \"Amazonas\",\n      \"Bahia\",\n      \"Ceará\",\n      \"Distrito Federal\",\n      \"Espírito Santo\",\n      \"Goiás\",\n      \"Maranhão\",\n      \"Mato Grosso\",\n      \"Mato Grosso do Sul\",\n      \"Minas Gerais\",\n      \"Pará\",\n      \"Paraíba\",\n      \"Paraná\",\n      \"Pernambuco\",\n      \"Piauí\",\n      \"Rio de Janeiro\",\n      \"Rio Grande do Norte\",\n      \"Rio Grande do Sul\",\n      \"Rondônia\",\n      \"Roraima\",\n      \"Santa Catarina\",\n      \"São Paulo\",\n      \"Sergipe\",\n      \"Tocantins\"\n    ],\n    \"province_labels\": {\n      \"Acre\": \"Acre\",\n      \"Alagoas\": \"Alagoas\",\n      \"Amapá\": \"Amapá\",\n      \"Amazonas\": \"Amazonas\",\n      \"Bahia\": \"Bahia\",\n      \"Ceará\": \"Ceará\",\n      \"Distrito Federal\": \"Distrito Federal\",\n      \"Espírito Santo\": \"Espírito Santo\",\n      \"Goiás\": \"Goiás\",\n      \"Maranhão\": \"Maranhão\",\n      \"Mato Grosso\": \"Mato Grosso\",\n      \"Mato Grosso do Sul\": \"Mato Grosso do Sul\",\n      \"Minas Gerais\": \"Minas Gerais\",\n      \"Pará\": \"Pará\",\n      \"Paraíba\": \"Paraíba\",\n      \"Paraná\": \"Paraná\",\n      \"Pernambuco\": \"Pernambuco\",\n      \"Piauí\": \"Piauí\",\n      \"Rio Grande do Norte\": \"Rio Grande do Norte\",\n      \"Rio Grande do Sul\": \"Rio Grande do Sul\",\n      \"Rio de Janeiro\": \"Rio de Janeiro\",\n      \"Rondônia\": \"Rondônia\",\n      \"Roraima\": \"Roraima\",\n      \"Santa Catarina\": \"Santa Catarina\",\n      \"São Paulo\": \"São Paulo\",\n      \"Sergipe\": \"Sergipe\",\n      \"Tocantins\": \"Tocantins\"\n    },\n    \"province_codes\": {\n      \"Acre\": \"AC\",\n      \"Alagoas\": \"AL\",\n      \"Amapá\": \"AP\",\n      \"Amazonas\": \"AM\",\n      \"Bahia\": \"BA\",\n      \"Ceará\": \"CE\",\n      \"Distrito Federal\": \"DF\",\n      \"Espírito Santo\": \"ES\",\n      \"Goiás\": \"GO\",\n      \"Maranhão\": \"MA\",\n      \"Mato Grosso\": \"MT\",\n      \"Mato Grosso do Sul\": \"MS\",\n      \"Minas Gerais\": \"MG\",\n      \"Pará\": \"PA\",\n      \"Paraíba\": \"PB\",\n      \"Paraná\": \"PR\",\n      \"Pernambuco\": \"PE\",\n      \"Piauí\": \"PI\",\n      \"Rio de Janeiro\": \"RJ\",\n      \"Rio Grande do Norte\": \"RN\",\n      \"Rio Grande do Sul\": \"RS\",\n      \"Rondônia\": \"RO\",\n      \"Roraima\": \"RR\",\n      \"Santa Catarina\": \"SC\",\n      \"São Paulo\": \"SP\",\n      \"Sergipe\": \"SE\",\n      \"Tocantins\": \"TO\"\n    },\n    \"Code2\": \"BR\",\n    \"Code3\": \"BRA\"\n  },\n  \"Brunei\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BR\",\n    \"Code3\": \"BRN\"\n  },\n  \"Bulgaria\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BG\",\n    \"Code3\": \"BGR\"\n  },\n  \"Cambodia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"KH\",\n    \"Code3\": \"KHM\"\n  },\n  \"Republic of Cameroon\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CM\",\n    \"Code3\": \"CMR\"\n  },\n  \"Cayman Islands\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"KY\",\n    \"Code3\": \"CYM\"\n  },\n  \"Chile\": {\n    \"label\": \"State\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"State\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CL\",\n    \"Code3\": \"CHL\"\n  },\n  \"China\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CN\",\n    \"Code3\": \"CHN\"\n  },\n  \"Colombia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CO\",\n    \"Code3\": \"COL\"\n  },\n  \"Comoros\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"KM\",\n    \"Code3\": \"COM\"\n  },\n  \"Congo\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CG\",\n    \"Code3\": \"COG\"\n  },\n  \"Costa Rica\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CR\",\n    \"Code3\": \"CRI\"\n  },\n  \"Côte d'Ivoire\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CI\",\n    \"Code3\": \"CIV\"\n  },\n  \"Croatia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"HR\",\n    \"Code3\": \"HRV\"\n  },\n  \"Curaçao\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CW\",\n    \"Code3\": \"CUW\"\n  },\n  \"Cyprus\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CY\",\n    \"Code3\": \"CYP\"\n  },\n  \"Czech Republic\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CZ\",\n    \"Code3\": \"CZE\"\n  },\n  \"Denmark\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"DK\",\n    \"Code3\": \"DNK\"\n  },\n  \"Dominica\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"DM\",\n    \"Code3\": \"DMA\"\n  },\n  \"Dominican Republic\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"DO\",\n    \"Code3\": \"DOM\"\n  },\n  \"Ecuador\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"EC\",\n    \"Code3\": \"ECU\"\n  },\n  \"Egypt\": {\n    \"label\": \"Governorate\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": [\n      \"Dakahlia\",\n      \"Red Sea\",\n      \"Beheira\",\n      \"Faiyum\",\n      \"Gharbia\",\n      \"Alexandria\",\n      \"Ismailia\",\n      \"Giza\",\n      \"Monufia\",\n      \"Minya\",\n      \"Cairo\",\n      \"Qalyubia\",\n      \"Luxor\",\n      \"New Valley\",\n      \"Al Sharqia\",\n      \"6th of October\",\n      \"Suez\",\n      \"Aswan\",\n      \"Asyut\",\n      \"Beni Suef\",\n      \"Port Said\",\n      \"Damietta\",\n      \"Helwan\",\n      \"South Sinai\",\n      \"Kafr el-Sheikh\",\n      \"Matrouh\",\n      \"Qena\",\n      \"North Sinai\",\n      \"Sohag\"\n    ],\n    \"province_labels\": {\n      \"6th of October\": \"6th of October\",\n      \"Al Sharqia\": \"Al Sharqia\",\n      \"Alexandria\": \"Alexandria\",\n      \"Aswan\": \"Aswan\",\n      \"Asyut\": \"Asyut\",\n      \"Beheira\": \"Beheira\",\n      \"Beni Suef\": \"Beni Suef\",\n      \"Cairo\": \"Cairo\",\n      \"Dakahlia\": \"Dakahlia\",\n      \"Damietta\": \"Damietta\",\n      \"Faiyum\": \"Faiyum\",\n      \"Gharbia\": \"Gharbia\",\n      \"Giza\": \"Giza\",\n      \"Helwan\": \"Helwan\",\n      \"Ismailia\": \"Ismailia\",\n      \"Kafr el-Sheikh\": \"Kafr el-Sheikh\",\n      \"Luxor\": \"Luxor\",\n      \"Matrouh\": \"Matrouh\",\n      \"Minya\": \"Minya\",\n      \"Monufia\": \"Monufia\",\n      \"New Valley\": \"New Valley\",\n      \"North Sinai\": \"North Sinai\",\n      \"Port Said\": \"Port Said\",\n      \"Qalyubia\": \"Qalyubia\",\n      \"Qena\": \"Qena\",\n      \"Red Sea\": \"Red Sea\",\n      \"Sohag\": \"Sohag\",\n      \"South Sinai\": \"South Sinai\",\n      \"Suez\": \"Suez\"\n    },\n    \"province_codes\": {\n      \"Dakahlia\": \"DK\",\n      \"Red Sea\": \"BA\",\n      \"Beheira\": \"BH\",\n      \"Faiyum\": \"FYM\",\n      \"Gharbia\": \"GH\",\n      \"Alexandria\": \"ALX\",\n      \"Ismailia\": \"IS\",\n      \"Giza\": \"GZ\",\n      \"Monufia\": \"MNF\",\n      \"Minya\": \"MN\",\n      \"Cairo\": \"C\",\n      \"Qalyubia\": \"KB\",\n      \"Luxor\": \"LX\",\n      \"New Valley\": \"WAD\",\n      \"Al Sharqia\": \"SHR\",\n      \"6th of October\": \"SU\",\n      \"Suez\": \"SUZ\",\n      \"Aswan\": \"ASN\",\n      \"Asyut\": \"AST\",\n      \"Beni Suef\": \"BNS\",\n      \"Port Said\": \"PTS\",\n      \"Damietta\": \"DT\",\n      \"Helwan\": \"HU\",\n      \"South Sinai\": \"JS\",\n      \"Kafr el-Sheikh\": \"KFS\",\n      \"Matrouh\": \"MT\",\n      \"Qena\": \"KN\",\n      \"North Sinai\": \"SIN\",\n      \"Sohag\": \"SHG\"\n    },\n    \"Code2\": \"EG\",\n    \"Code3\": \"EGY\"\n  },\n  \"El Salvador\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SV\",\n    \"Code3\": \"SLV\"\n  },\n  \"Estonia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"EE\",\n    \"Code3\": \"EST\"\n  },\n  \"Ethiopia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"ET\",\n    \"Code3\": \"ETH\"\n  },\n  \"Faroe Islands\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"FO\",\n    \"Code3\": \"FRO\"\n  },\n  \"Fiji\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"FJ\",\n    \"Code3\": \"FJI\"\n  },\n  \"Finland\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"FI\",\n    \"Code3\": \"FIN\"\n  },\n  \"France\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"FR\",\n    \"Code3\": \"FRA\"\n  },\n  \"French Polynesia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"PF\",\n    \"Code3\": \"PYF\"\n  },\n  \"Gambia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GM\",\n    \"Code3\": \"GMB\"\n  },\n  \"Georgia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GE\",\n    \"Code3\": \"GEO\"\n  },\n  \"Germany\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"DE\",\n    \"Code3\": \"DEU\"\n  },\n  \"Ghana\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GH\",\n    \"Code3\": \"GHA\"\n  },\n  \"Gibraltar\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GI\",\n    \"Code3\": \"GIB\"\n  },\n  \"Greece\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GR\",\n    \"Code3\": \"GRC\"\n  },\n  \"Greenland\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GL\",\n    \"Code3\": \"GRL\"\n  },\n  \"Grenada\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GD\",\n    \"Code3\": \"GRD\"\n  },\n  \"Guadeloupe\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GP\",\n    \"Code3\": \"GLP\"\n  },\n  \"Guatemala\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": [\n      \"Alta Verapaz\",\n      \"Baja Verapaz\",\n      \"Chimaltenango\",\n      \"Chiquimula\",\n      \"El Progreso\",\n      \"Escuintla\",\n      \"Guatemala\",\n      \"Huehuetenango\",\n      \"Izabal\",\n      \"Jalapa\",\n      \"Jutiapa\",\n      \"Petén\",\n      \"Quetzaltenango\",\n      \"Quiché\",\n      \"Retalhuleu\",\n      \"Sacatepéquez\",\n      \"San Marcos\",\n      \"Santa Rosa\",\n      \"Sololá\",\n      \"Suchitepéquez\",\n      \"Totonicapán\",\n      \"Zacapa\"\n    ],\n    \"province_labels\": {\n      \"Alta Verapaz\": \"Alta Verapaz\",\n      \"Baja Verapaz\": \"Baja Verapaz\",\n      \"Chimaltenango\": \"Chimaltenango\",\n      \"Chiquimula\": \"Chiquimula\",\n      \"El Progreso\": \"El Progreso\",\n      \"Escuintla\": \"Escuintla\",\n      \"Guatemala\": \"Guatemala\",\n      \"Huehuetenango\": \"Huehuetenango\",\n      \"Izabal\": \"Izabal\",\n      \"Jalapa\": \"Jalapa\",\n      \"Jutiapa\": \"Jutiapa\",\n      \"Petén\": \"Petén\",\n      \"Quetzaltenango\": \"Quetzaltenango\",\n      \"Quiché\": \"Quiché\",\n      \"Retalhuleu\": \"Retalhuleu\",\n      \"Sacatepéquez\": \"Sacatepéquez\",\n      \"San Marcos\": \"San Marcos\",\n      \"Santa Rosa\": \"Santa Rosa\",\n      \"Sololá\": \"Sololá\",\n      \"Suchitepéquez\": \"Suchitepéquez\",\n      \"Totonicapán\": \"Totonicapán\",\n      \"Zacapa\": \"Zacapa\"\n    },\n    \"province_codes\": {\n      \"Alta Verapaz\": \"AVE\",\n      \"Baja Verapaz\": \"BVE\",\n      \"Chimaltenango\": \"CMT\",\n      \"Chiquimula\": \"CQM\",\n      \"El Progreso\": \"EPR\",\n      \"Escuintla\": \"ESC\",\n      \"Guatemala\": \"GUA\",\n      \"Huehuetenango\": \"HUE\",\n      \"Izabal\": \"IZA\",\n      \"Jalapa\": \"JAL\",\n      \"Jutiapa\": \"JUT\",\n      \"Petén\": \"PET\",\n      \"Quetzaltenango\": \"QUE\",\n      \"Quiché\": \"QUI\",\n      \"Retalhuleu\": \"RET\",\n      \"Sacatepéquez\": \"SAC\",\n      \"San Marcos\": \"SMA\",\n      \"Santa Rosa\": \"SRO\",\n      \"Sololá\": \"SOL\",\n      \"Suchitepéquez\": \"SUC\",\n      \"Totonicapán\": \"TOT\",\n      \"Zacapa\": \"ZAC\"\n    },\n    \"Code2\": \"GT\",\n    \"Code3\": \"GTM\"\n  },\n  \"Guernsey\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GG\",\n    \"Code3\": \"GGY\"\n  },\n  \"Guyana\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GY\",\n    \"Code3\": \"GUY\"\n  },\n  \"Haiti\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"HT\",\n    \"Code3\": \"HTI\"\n  },\n  \"Honduras\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"HN\",\n    \"Code3\": \"HND\"\n  },\n  \"Hong Kong\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"HK\",\n    \"Code3\": \"HKG\"\n  },\n  \"Hungary\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"HU\",\n    \"Code3\": \"HUN\"\n  },\n  \"Iceland\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"IS\",\n    \"Code3\": \"ISL\"\n  },\n  \"India\": {\n    \"label\": \"State\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"State\",\n    \"provinces\": [\n      \"Andaman and Nicobar\",\n      \"Andhra Pradesh\",\n      \"Arunachal Pradesh\",\n      \"Assam\",\n      \"Bihar\",\n      \"Chandigarh\",\n      \"Chattisgarh\",\n      \"Dadra and Nagar Haveli\",\n      \"Daman and Diu\",\n      \"Delhi\",\n      \"Goa\",\n      \"Gujarat\",\n      \"Haryana\",\n      \"Himachal Pradesh\",\n      \"Jammu and Kashmir\",\n      \"Jharkhand\",\n      \"Karnataka\",\n      \"Kerala\",\n      \"Lakshadweep\",\n      \"Madhya Pradesh\",\n      \"Maharashtra\",\n      \"Manipur\",\n      \"Meghalaya\",\n      \"Mizoram\",\n      \"Nagaland\",\n      \"Orissa\",\n      \"Puducherry\",\n      \"Punjab\",\n      \"Rajasthan\",\n      \"Sikkim\",\n      \"Tamil Nadu\",\n      \"Telangana\",\n      \"Tripura\",\n      \"Uttar Pradesh\",\n      \"Uttarakhand\",\n      \"West Bengal\"\n    ],\n    \"province_labels\": {\n      \"Andaman and Nicobar\": \"Andaman and Nicobar\",\n      \"Andhra Pradesh\": \"Andhra Pradesh\",\n      \"Arunachal Pradesh\": \"Arunachal Pradesh\",\n      \"Assam\": \"Assam\",\n      \"Bihar\": \"Bihar\",\n      \"Chandigarh\": \"Chandigarh\",\n      \"Chattisgarh\": \"Chattisgarh\",\n      \"Dadra and Nagar Haveli\": \"Dadra and Nagar Haveli\",\n      \"Daman and Diu\": \"Daman and Diu\",\n      \"Delhi\": \"Delhi\",\n      \"Goa\": \"Goa\",\n      \"Gujarat\": \"Gujarat\",\n      \"Haryana\": \"Haryana\",\n      \"Himachal Pradesh\": \"Himachal Pradesh\",\n      \"Jammu and Kashmir\": \"Jammu and Kashmir\",\n      \"Jharkhand\": \"Jharkhand\",\n      \"Karnataka\": \"Karnataka\",\n      \"Kerala\": \"Kerala\",\n      \"Lakshadweep\": \"Lakshadweep\",\n      \"Madhya Pradesh\": \"Madhya Pradesh\",\n      \"Maharashtra\": \"Maharashtra\",\n      \"Manipur\": \"Manipur\",\n      \"Meghalaya\": \"Meghalaya\",\n      \"Mizoram\": \"Mizoram\",\n      \"Nagaland\": \"Nagaland\",\n      \"Orissa\": \"Orissa\",\n      \"Puducherry\": \"Puducherry\",\n      \"Punjab\": \"Punjab\",\n      \"Rajasthan\": \"Rajasthan\",\n      \"Sikkim\": \"Sikkim\",\n      \"Tamil Nadu\": \"Tamil Nadu\",\n      \"Telangana\": \"Telangana\",\n      \"Tripura\": \"Tripura\",\n      \"Uttar Pradesh\": \"Uttar Pradesh\",\n      \"Uttarakhand\": \"Uttarakhand\",\n      \"West Bengal\": \"West Bengal\"\n    },\n    \"province_codes\": {\n      \"Andaman and Nicobar\": \"AN\",\n      \"Andhra Pradesh\": \"AP\",\n      \"Arunachal Pradesh\": \"AR\",\n      \"Assam\": \"AS\",\n      \"Bihar\": \"BR\",\n      \"Chandigarh\": \"CH\",\n      \"Chattisgarh\": \"CG\",\n      \"Dadra and Nagar Haveli\": \"DN\",\n      \"Daman and Diu\": \"DD\",\n      \"Delhi\": \"DL\",\n      \"Goa\": \"GA\",\n      \"Gujarat\": \"GJ\",\n      \"Haryana\": \"HR\",\n      \"Himachal Pradesh\": \"HP\",\n      \"Jammu and Kashmir\": \"JK\",\n      \"Jharkhand\": \"JH\",\n      \"Karnataka\": \"KA\",\n      \"Kerala\": \"KL\",\n      \"Lakshadweep\": \"LD\",\n      \"Madhya Pradesh\": \"MP\",\n      \"Maharashtra\": \"MH\",\n      \"Manipur\": \"MN\",\n      \"Meghalaya\": \"ML\",\n      \"Mizoram\": \"MZ\",\n      \"Nagaland\": \"NL\",\n      \"Orissa\": \"OR\",\n      \"Puducherry\": \"PY\",\n      \"Punjab\": \"PB\",\n      \"Rajasthan\": \"RJ\",\n      \"Sikkim\": \"SK\",\n      \"Tamil Nadu\": \"TN\",\n      \"Telangana\": \"TS\",\n      \"Tripura\": \"TR\",\n      \"Uttar Pradesh\": \"UP\",\n      \"Uttarakhand\": \"UK\",\n      \"West Bengal\": \"WB\"\n    },\n    \"Code2\": \"IN\",\n    \"Code3\": \"IND\"\n  },\n  \"Indonesia\": {\n    \"label\": \"Province\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Province\",\n    \"provinces\": [\n      \"Aceh\",\n      \"Bali\",\n      \"Bangka Belitung\",\n      \"Banten\",\n      \"Bengkulu\",\n      \"Gorontalo\",\n      \"Jakarta\",\n      \"Jambi\",\n      \"Jawa Barat\",\n      \"Jawa Tengah\",\n      \"Jawa Timur\",\n      \"Kalimantan Barat\",\n      \"Kalimantan Selatan\",\n      \"Kalimantan Tengah\",\n      \"Kalimantan Timur\",\n      \"Kalimantan Utara\",\n      \"Kepulauan Riau\",\n      \"Lampung\",\n      \"Maluku\",\n      \"Maluku Utara\",\n      \"Nusa Tenggara Barat\",\n      \"Nusa Tenggara Timur\",\n      \"Papua\",\n      \"Papua Barat\",\n      \"Riau\",\n      \"Sulawesi Barat\",\n      \"Sulawesi Selatan\",\n      \"Sulawesi Tengah\",\n      \"Sulawesi Tenggara\",\n      \"Sulawesi Utara\",\n      \"Sumatra Barat\",\n      \"Sumatra Selatan\",\n      \"Sumatra Utara\",\n      \"Yogyakarta\"\n    ],\n    \"province_labels\": {\n      \"Aceh\": \"Aceh\",\n      \"Bali\": \"Bali\",\n      \"Bangka Belitung\": \"Bangka Belitung\",\n      \"Banten\": \"Banten\",\n      \"Bengkulu\": \"Bengkulu\",\n      \"Gorontalo\": \"Gorontalo\",\n      \"Jakarta\": \"Jakarta\",\n      \"Jambi\": \"Jambi\",\n      \"Jawa Barat\": \"Jawa Barat\",\n      \"Jawa Tengah\": \"Jawa Tengah\",\n      \"Jawa Timur\": \"Jawa Timur\",\n      \"Kalimantan Barat\": \"Kalimantan Barat\",\n      \"Kalimantan Selatan\": \"Kalimantan Selatan\",\n      \"Kalimantan Tengah\": \"Kalimantan Tengah\",\n      \"Kalimantan Timur\": \"Kalimantan Timur\",\n      \"Kalimantan Utara\": \"Kalimantan Utara\",\n      \"Kepulauan Riau\": \"Kepulauan Riau\",\n      \"Lampung\": \"Lampung\",\n      \"Maluku\": \"Maluku\",\n      \"Maluku Utara\": \"Maluku Utara\",\n      \"Nusa Tenggara Barat\": \"Nusa Tenggara Barat\",\n      \"Nusa Tenggara Timur\": \"Nusa Tenggara Timur\",\n      \"Papua\": \"Papua\",\n      \"Papua Barat\": \"Papua Barat\",\n      \"Riau\": \"Riau\",\n      \"Sulawesi Barat\": \"Sulawesi Barat\",\n      \"Sulawesi Selatan\": \"Sulawesi Selatan\",\n      \"Sulawesi Tengah\": \"Sulawesi Tengah\",\n      \"Sulawesi Tenggara\": \"Sulawesi Tenggara\",\n      \"Sulawesi Utara\": \"Sulawesi Utara\",\n      \"Sumatra Barat\": \"Sumatra Barat\",\n      \"Sumatra Selatan\": \"Sumatra Selatan\",\n      \"Sumatra Utara\": \"Sumatra Utara\",\n      \"Yogyakarta\": \"Yogyakarta\"\n    },\n    \"province_codes\": {\n      \"Aceh\": \"AC\",\n      \"Bali\": \"BA\",\n      \"Bangka Belitung\": \"BB\",\n      \"Banten\": \"BT\",\n      \"Bengkulu\": \"BE\",\n      \"Gorontalo\": \"GO\",\n      \"Jakarta\": \"JK\",\n      \"Jambi\": \"JA\",\n      \"Jawa Barat\": \"JB\",\n      \"Jawa Tengah\": \"JT\",\n      \"Jawa Timur\": \"JI\",\n      \"Kalimantan Barat\": \"KB\",\n      \"Kalimantan Selatan\": \"KS\",\n      \"Kalimantan Tengah\": \"KT\",\n      \"Kalimantan Timur\": \"KI\",\n      \"Kalimantan Utara\": \"KU\",\n      \"Kepulauan Riau\": \"KR\",\n      \"Lampung\": \"LA\",\n      \"Maluku\": \"MA\",\n      \"Maluku Utara\": \"MU\",\n      \"Nusa Tenggara Barat\": \"NB\",\n      \"Nusa Tenggara Timur\": \"NT\",\n      \"Papua\": \"PA\",\n      \"Papua Barat\": \"PB\",\n      \"Riau\": \"RI\",\n      \"Sulawesi Barat\": \"SR\",\n      \"Sulawesi Selatan\": \"SN\",\n      \"Sulawesi Tengah\": \"ST\",\n      \"Sulawesi Tenggara\": \"SG\",\n      \"Sulawesi Utara\": \"SA\",\n      \"Sumatra Barat\": \"SB\",\n      \"Sumatra Selatan\": \"SS\",\n      \"Sumatra Utara\": \"SU\",\n      \"Yogyakarta\": \"YO\"\n    },\n    \"Code2\": \"ID\",\n    \"Code3\": \"IDN\"\n  },\n  \"Ireland\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"IE\",\n    \"Code3\": \"IRL\"\n  },\n  \"Isle Of Man\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"IM\",\n    \"Code3\": \"IMN\"\n  },\n  \"Israel\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"IL\",\n    \"Code3\": \"ISR\"\n  },\n  \"Italy\": {\n    \"label\": \"Province\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Province\",\n    \"provinces\": [\n      \"Agrigento\",\n      \"Alessandria\",\n      \"Ancona\",\n      \"Aosta\",\n      \"Arezzo\",\n      \"Ascoli Piceno\",\n      \"Asti\",\n      \"Avellino\",\n      \"Bari\",\n      \"Barletta-Andria-Trani\",\n      \"Belluno\",\n      \"Benevento\",\n      \"Bergamo\",\n      \"Biella\",\n      \"Bologna\",\n      \"Bolzano\",\n      \"Brescia\",\n      \"Brindisi\",\n      \"Cagliari\",\n      \"Caltanissetta\",\n      \"Campobasso\",\n      \"Carbonia-Iglesias\",\n      \"Caserta\",\n      \"Catania\",\n      \"Catanzaro\",\n      \"Chieti\",\n      \"Como\",\n      \"Cosenza\",\n      \"Cremona\",\n      \"Crotone\",\n      \"Cuneo\",\n      \"Enna\",\n      \"Fermo\",\n      \"Ferrara\",\n      \"Firenze\",\n      \"Foggia\",\n      \"Forlì-Cesena\",\n      \"Frosinone\",\n      \"Genova\",\n      \"Gorizia\",\n      \"Grosseto\",\n      \"Imperia\",\n      \"Isernia\",\n      \"La Spezia\",\n      \"L'Aquila\",\n      \"Latina\",\n      \"Lecce\",\n      \"Lecco\",\n      \"Livorno\",\n      \"Lodi\",\n      \"Lucca\",\n      \"Macerata\",\n      \"Mantova\",\n      \"Massa-Carrara\",\n      \"Matera\",\n      \"Medio Campidano\",\n      \"Messina\",\n      \"Milano\",\n      \"Modena\",\n      \"Monza e Brianza\",\n      \"Napoli\",\n      \"Novara\",\n      \"Nuoro\",\n      \"Ogliastra\",\n      \"Olbia-Tempio\",\n      \"Oristano\",\n      \"Padova\",\n      \"Palermo\",\n      \"Parma\",\n      \"Pavia\",\n      \"Perugia\",\n      \"Pesaro e Urbino\",\n      \"Pescara\",\n      \"Piacenza\",\n      \"Pisa\",\n      \"Pistoia\",\n      \"Pordenone\",\n      \"Potenza\",\n      \"Prato\",\n      \"Ragusa\",\n      \"Ravenna\",\n      \"Reggio Calabria\",\n      \"Reggio Emilia\",\n      \"Rieti\",\n      \"Rimini\",\n      \"Roma\",\n      \"Rovigo\",\n      \"Salerno\",\n      \"Sassari\",\n      \"Savona\",\n      \"Siena\",\n      \"Siracusa\",\n      \"Sondrio\",\n      \"Taranto\",\n      \"Teramo\",\n      \"Terni\",\n      \"Torino\",\n      \"Trapani\",\n      \"Trento\",\n      \"Treviso\",\n      \"Trieste\",\n      \"Udine\",\n      \"Varese\",\n      \"Venezia\",\n      \"Verbano-Cusio-Ossola\",\n      \"Vercelli\",\n      \"Verona\",\n      \"Vibo Valentia\",\n      \"Vicenza\",\n      \"Viterbo\"\n    ],\n    \"province_labels\": {\n      \"Agrigento\": \"Agrigento\",\n      \"Alessandria\": \"Alessandria\",\n      \"Ancona\": \"Ancona\",\n      \"Aosta\": \"Aosta\",\n      \"Arezzo\": \"Arezzo\",\n      \"Ascoli Piceno\": \"Ascoli Piceno\",\n      \"Asti\": \"Asti\",\n      \"Avellino\": \"Avellino\",\n      \"Bari\": \"Bari\",\n      \"Barletta-Andria-Trani\": \"Barletta-Andria-Trani\",\n      \"Belluno\": \"Belluno\",\n      \"Benevento\": \"Benevento\",\n      \"Bergamo\": \"Bergamo\",\n      \"Biella\": \"Biella\",\n      \"Bologna\": \"Bologna\",\n      \"Bolzano\": \"Bolzano\",\n      \"Brescia\": \"Brescia\",\n      \"Brindisi\": \"Brindisi\",\n      \"Cagliari\": \"Cagliari\",\n      \"Caltanissetta\": \"Caltanissetta\",\n      \"Campobasso\": \"Campobasso\",\n      \"Carbonia-Iglesias\": \"Carbonia-Iglesias\",\n      \"Caserta\": \"Caserta\",\n      \"Catania\": \"Catania\",\n      \"Catanzaro\": \"Catanzaro\",\n      \"Chieti\": \"Chieti\",\n      \"Como\": \"Como\",\n      \"Cosenza\": \"Cosenza\",\n      \"Cremona\": \"Cremona\",\n      \"Crotone\": \"Crotone\",\n      \"Cuneo\": \"Cuneo\",\n      \"Enna\": \"Enna\",\n      \"Fermo\": \"Fermo\",\n      \"Ferrara\": \"Ferrara\",\n      \"Firenze\": \"Firenze\",\n      \"Foggia\": \"Foggia\",\n      \"Forlì-Cesena\": \"Forlì-Cesena\",\n      \"Frosinone\": \"Frosinone\",\n      \"Genova\": \"Genova\",\n      \"Gorizia\": \"Gorizia\",\n      \"Grosseto\": \"Grosseto\",\n      \"Imperia\": \"Imperia\",\n      \"Isernia\": \"Isernia\",\n      \"L'Aquila\": \"L'Aquila\",\n      \"La Spezia\": \"La Spezia\",\n      \"Latina\": \"Latina\",\n      \"Lecce\": \"Lecce\",\n      \"Lecco\": \"Lecco\",\n      \"Livorno\": \"Livorno\",\n      \"Lodi\": \"Lodi\",\n      \"Lucca\": \"Lucca\",\n      \"Macerata\": \"Macerata\",\n      \"Mantova\": \"Mantova\",\n      \"Massa-Carrara\": \"Massa-Carrara\",\n      \"Matera\": \"Matera\",\n      \"Medio Campidano\": \"Medio Campidano\",\n      \"Messina\": \"Messina\",\n      \"Milano\": \"Milano\",\n      \"Modena\": \"Modena\",\n      \"Monza e Brianza\": \"Monza e Brianza\",\n      \"Napoli\": \"Napoli\",\n      \"Novara\": \"Novara\",\n      \"Nuoro\": \"Nuoro\",\n      \"Ogliastra\": \"Ogliastra\",\n      \"Olbia-Tempio\": \"Olbia-Tempio\",\n      \"Oristano\": \"Oristano\",\n      \"Padova\": \"Padova\",\n      \"Palermo\": \"Palermo\",\n      \"Parma\": \"Parma\",\n      \"Pavia\": \"Pavia\",\n      \"Perugia\": \"Perugia\",\n      \"Pesaro e Urbino\": \"Pesaro e Urbino\",\n      \"Pescara\": \"Pescara\",\n      \"Piacenza\": \"Piacenza\",\n      \"Pisa\": \"Pisa\",\n      \"Pistoia\": \"Pistoia\",\n      \"Pordenone\": \"Pordenone\",\n      \"Potenza\": \"Potenza\",\n      \"Prato\": \"Prato\",\n      \"Ragusa\": \"Ragusa\",\n      \"Ravenna\": \"Ravenna\",\n      \"Reggio Calabria\": \"Reggio Calabria\",\n      \"Reggio Emilia\": \"Reggio Emilia\",\n      \"Rieti\": \"Rieti\",\n      \"Rimini\": \"Rimini\",\n      \"Roma\": \"Roma\",\n      \"Rovigo\": \"Rovigo\",\n      \"Salerno\": \"Salerno\",\n      \"Sassari\": \"Sassari\",\n      \"Savona\": \"Savona\",\n      \"Siena\": \"Siena\",\n      \"Siracusa\": \"Siracusa\",\n      \"Sondrio\": \"Sondrio\",\n      \"Taranto\": \"Taranto\",\n      \"Teramo\": \"Teramo\",\n      \"Terni\": \"Terni\",\n      \"Torino\": \"Torino\",\n      \"Trapani\": \"Trapani\",\n      \"Trento\": \"Trento\",\n      \"Treviso\": \"Treviso\",\n      \"Trieste\": \"Trieste\",\n      \"Udine\": \"Udine\",\n      \"Varese\": \"Varese\",\n      \"Venezia\": \"Venezia\",\n      \"Verbano-Cusio-Ossola\": \"Verbano-Cusio-Ossola\",\n      \"Vercelli\": \"Vercelli\",\n      \"Verona\": \"Verona\",\n      \"Vibo Valentia\": \"Vibo Valentia\",\n      \"Vicenza\": \"Vicenza\",\n      \"Viterbo\": \"Viterbo\"\n    },\n    \"province_codes\": {\n      \"Agrigento\": \"AG\",\n      \"Alessandria\": \"AL\",\n      \"Ancona\": \"AN\",\n      \"Aosta\": \"AO\",\n      \"Arezzo\": \"AR\",\n      \"Ascoli Piceno\": \"AP\",\n      \"Asti\": \"AT\",\n      \"Avellino\": \"AV\",\n      \"Bari\": \"BA\",\n      \"Barletta-Andria-Trani\": \"BT\",\n      \"Belluno\": \"BL\",\n      \"Benevento\": \"BN\",\n      \"Bergamo\": \"BG\",\n      \"Biella\": \"BI\",\n      \"Bologna\": \"BO\",\n      \"Bolzano\": \"BZ\",\n      \"Brescia\": \"BS\",\n      \"Brindisi\": \"BR\",\n      \"Cagliari\": \"CA\",\n      \"Caltanissetta\": \"CL\",\n      \"Campobasso\": \"CB\",\n      \"Carbonia-Iglesias\": \"CI\",\n      \"Caserta\": \"CE\",\n      \"Catania\": \"CT\",\n      \"Catanzaro\": \"CZ\",\n      \"Chieti\": \"CH\",\n      \"Como\": \"CO\",\n      \"Cosenza\": \"CS\",\n      \"Cremona\": \"CR\",\n      \"Crotone\": \"KR\",\n      \"Cuneo\": \"CN\",\n      \"Enna\": \"EN\",\n      \"Fermo\": \"FM\",\n      \"Ferrara\": \"FE\",\n      \"Firenze\": \"FI\",\n      \"Foggia\": \"FG\",\n      \"Forlì-Cesena\": \"FC\",\n      \"Frosinone\": \"FR\",\n      \"Genova\": \"GE\",\n      \"Gorizia\": \"GO\",\n      \"Grosseto\": \"GR\",\n      \"Imperia\": \"IM\",\n      \"Isernia\": \"IS\",\n      \"La Spezia\": \"SP\",\n      \"L'Aquila\": \"AQ\",\n      \"Latina\": \"LT\",\n      \"Lecce\": \"LE\",\n      \"Lecco\": \"LC\",\n      \"Livorno\": \"LI\",\n      \"Lodi\": \"LO\",\n      \"Lucca\": \"LU\",\n      \"Macerata\": \"MC\",\n      \"Mantova\": \"MN\",\n      \"Massa-Carrara\": \"MS\",\n      \"Matera\": \"MT\",\n      \"Medio Campidano\": \"VS\",\n      \"Messina\": \"ME\",\n      \"Milano\": \"MI\",\n      \"Modena\": \"MO\",\n      \"Monza e Brianza\": \"MB\",\n      \"Napoli\": \"NA\",\n      \"Novara\": \"NO\",\n      \"Nuoro\": \"NU\",\n      \"Ogliastra\": \"OG\",\n      \"Olbia-Tempio\": \"OT\",\n      \"Oristano\": \"OR\",\n      \"Padova\": \"PD\",\n      \"Palermo\": \"PA\",\n      \"Parma\": \"PR\",\n      \"Pavia\": \"PV\",\n      \"Perugia\": \"PG\",\n      \"Pesaro e Urbino\": \"PU\",\n      \"Pescara\": \"PE\",\n      \"Piacenza\": \"PC\",\n      \"Pisa\": \"PI\",\n      \"Pistoia\": \"PT\",\n      \"Pordenone\": \"PN\",\n      \"Potenza\": \"PZ\",\n      \"Prato\": \"PO\",\n      \"Ragusa\": \"RG\",\n      \"Ravenna\": \"RA\",\n      \"Reggio Calabria\": \"RC\",\n      \"Reggio Emilia\": \"RE\",\n      \"Rieti\": \"RI\",\n      \"Rimini\": \"RN\",\n      \"Roma\": \"RM\",\n      \"Rovigo\": \"RO\",\n      \"Salerno\": \"SA\",\n      \"Sassari\": \"SS\",\n      \"Savona\": \"SV\",\n      \"Siena\": \"SI\",\n      \"Siracusa\": \"SR\",\n      \"Sondrio\": \"SO\",\n      \"Taranto\": \"TA\",\n      \"Teramo\": \"TE\",\n      \"Terni\": \"TR\",\n      \"Torino\": \"TO\",\n      \"Trapani\": \"TP\",\n      \"Trento\": \"TN\",\n      \"Treviso\": \"TV\",\n      \"Trieste\": \"TS\",\n      \"Udine\": \"UD\",\n      \"Varese\": \"VA\",\n      \"Venezia\": \"VE\",\n      \"Verbano-Cusio-Ossola\": \"VB\",\n      \"Vercelli\": \"VC\",\n      \"Verona\": \"VR\",\n      \"Vibo Valentia\": \"VV\",\n      \"Vicenza\": \"VI\",\n      \"Viterbo\": \"VT\"\n    },\n    \"Code2\": \"IT\",\n    \"Code3\": \"ITA\"\n  },\n  \"Jamaica\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"JM\",\n    \"Code3\": \"JAM\"\n  },\n  \"Japan\": {\n    \"label\": \"Prefecture\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": \"japan_prefectures\",\n    \"province_label\": \"Prefecture\",\n    \"provinces\": [\n      \"Aichi\",\n      \"Akita\",\n      \"Aomori\",\n      \"Chiba\",\n      \"Ehime\",\n      \"Fukui\",\n      \"Fukuoka\",\n      \"Fukushima\",\n      \"Gifu\",\n      \"Gunma\",\n      \"Hiroshima\",\n      \"Hokkaidō\",\n      \"Hyōgo\",\n      \"Ibaraki\",\n      \"Ishikawa\",\n      \"Iwate\",\n      \"Kagawa\",\n      \"Kagoshima\",\n      \"Kanagawa\",\n      \"Kōchi\",\n      \"Kumamoto\",\n      \"Kyōto\",\n      \"Mie\",\n      \"Miyagi\",\n      \"Miyazaki\",\n      \"Nagano\",\n      \"Nagasaki\",\n      \"Nara\",\n      \"Niigata\",\n      \"Ōita\",\n      \"Okayama\",\n      \"Okinawa\",\n      \"Ōsaka\",\n      \"Saga\",\n      \"Saitama\",\n      \"Shiga\",\n      \"Shimane\",\n      \"Shizuoka\",\n      \"Tochigi\",\n      \"Tokushima\",\n      \"Tottori\",\n      \"Toyama\",\n      \"Tōkyō\",\n      \"Wakayama\",\n      \"Yamagata\",\n      \"Yamaguchi\",\n      \"Yamanashi\"\n    ],\n    \"province_labels\": {\n      \"Aichi\": \"Aichi\",\n      \"Akita\": \"Akita\",\n      \"Aomori\": \"Aomori\",\n      \"Chiba\": \"Chiba\",\n      \"Ehime\": \"Ehime\",\n      \"Fukui\": \"Fukui\",\n      \"Fukuoka\": \"Fukuoka\",\n      \"Fukushima\": \"Fukushima\",\n      \"Gifu\": \"Gifu\",\n      \"Gunma\": \"Gunma\",\n      \"Hiroshima\": \"Hiroshima\",\n      \"Hokkaidō\": \"Hokkaidō\",\n      \"Hyōgo\": \"Hyōgo\",\n      \"Ibaraki\": \"Ibaraki\",\n      \"Ishikawa\": \"Ishikawa\",\n      \"Iwate\": \"Iwate\",\n      \"Kagawa\": \"Kagawa\",\n      \"Kagoshima\": \"Kagoshima\",\n      \"Kanagawa\": \"Kanagawa\",\n      \"Kōchi\": \"Kōchi\",\n      \"Kumamoto\": \"Kumamoto\",\n      \"Kyōto\": \"Kyōto\",\n      \"Mie\": \"Mie\",\n      \"Miyagi\": \"Miyagi\",\n      \"Miyazaki\": \"Miyazaki\",\n      \"Nagano\": \"Nagano\",\n      \"Nagasaki\": \"Nagasaki\",\n      \"Nara\": \"Nara\",\n      \"Niigata\": \"Niigata\",\n      \"Ōita\": \"Ōita\",\n      \"Okayama\": \"Okayama\",\n      \"Okinawa\": \"Okinawa\",\n      \"Ōsaka\": \"Ōsaka\",\n      \"Saga\": \"Saga\",\n      \"Saitama\": \"Saitama\",\n      \"Shiga\": \"Shiga\",\n      \"Shimane\": \"Shimane\",\n      \"Shizuoka\": \"Shizuoka\",\n      \"Tochigi\": \"Tochigi\",\n      \"Tokushima\": \"Tokushima\",\n      \"Tōkyō\": \"Tōkyō\",\n      \"Tottori\": \"Tottori\",\n      \"Toyama\": \"Toyama\",\n      \"Wakayama\": \"Wakayama\",\n      \"Yamagata\": \"Yamagata\",\n      \"Yamaguchi\": \"Yamaguchi\",\n      \"Yamanashi\": \"Yamanashi\"\n    },\n    \"province_codes\": {\n      \"Aichi\": \"JP-23\",\n      \"Akita\": \"JP-05\",\n      \"Aomori\": \"JP-02\",\n      \"Chiba\": \"JP-12\",\n      \"Ehime\": \"JP-38\",\n      \"Fukui\": \"JP-18\",\n      \"Fukuoka\": \"JP-40\",\n      \"Fukushima\": \"JP-07\",\n      \"Gifu\": \"JP-21\",\n      \"Gunma\": \"JP-10\",\n      \"Hiroshima\": \"JP-34\",\n      \"Hokkaidō\": \"JP-01\",\n      \"Hyōgo\": \"JP-28\",\n      \"Ibaraki\": \"JP-08\",\n      \"Ishikawa\": \"JP-17\",\n      \"Iwate\": \"JP-03\",\n      \"Kagawa\": \"JP-37\",\n      \"Kagoshima\": \"JP-46\",\n      \"Kanagawa\": \"JP-14\",\n      \"Kōchi\": \"JP-39\",\n      \"Kumamoto\": \"JP-43\",\n      \"Kyōto\": \"JP-26\",\n      \"Mie\": \"JP-24\",\n      \"Miyagi\": \"JP-04\",\n      \"Miyazaki\": \"JP-45\",\n      \"Nagano\": \"JP-20\",\n      \"Nagasaki\": \"JP-42\",\n      \"Nara\": \"JP-29\",\n      \"Niigata\": \"JP-15\",\n      \"Ōita\": \"JP-44\",\n      \"Okayama\": \"JP-33\",\n      \"Okinawa\": \"JP-47\",\n      \"Ōsaka\": \"JP-27\",\n      \"Saga\": \"JP-41\",\n      \"Saitama\": \"JP-11\",\n      \"Shiga\": \"JP-25\",\n      \"Shimane\": \"JP-32\",\n      \"Shizuoka\": \"JP-22\",\n      \"Tochigi\": \"JP-09\",\n      \"Tokushima\": \"JP-36\",\n      \"Tottori\": \"JP-31\",\n      \"Toyama\": \"JP-16\",\n      \"Tōkyō\": \"JP-13\",\n      \"Wakayama\": \"JP-30\",\n      \"Yamagata\": \"JP-06\",\n      \"Yamaguchi\": \"JP-35\",\n      \"Yamanashi\": \"JP-19\"\n    },\n    \"Code2\": \"JP\",\n    \"Code3\": \"JPN\"\n  },\n  \"Jersey\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"JE\",\n    \"Code3\": \"JEY\"\n  },\n  \"Jordan\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"JO\",\n    \"Code3\": \"JOR\"\n  },\n  \"Kazakhstan\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"KZ\",\n    \"Code3\": \"KAZ\"\n  },\n  \"Kenya\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"KE\",\n    \"Code3\": \"KEN\"\n  },\n  \"Kosovo\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"XK\",\n    \"Code3\": \"XKX\"\n  },\n  \"Kuwait\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"KW\",\n    \"Code3\": \"KWT\"\n  },\n  \"Kyrgyzstan\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"KG\",\n    \"Code3\": \"KGZ\"\n  },\n  \"Latvia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"LV\",\n    \"Code3\": \"LVA\"\n  },\n  \"Lebanon\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"LB\",\n    \"Code3\": \"LBN\"\n  },\n  \"Liberia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"LR\",\n    \"Code3\": \"LBR\"\n  },\n  \"Liechtenstein\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"LI\",\n    \"Code3\": \"LIE\"\n  },\n  \"Lithuania\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"LT\",\n    \"Code3\": \"LTU\"\n  },\n  \"Luxembourg\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"LU\",\n    \"Code3\": \"LUX\"\n  },\n  \"Macao\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MO\",\n    \"Code3\": \"MAC\"\n  },\n  \"Macedonia, Republic Of\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MK\",\n    \"Code3\": \"MKD\"\n  },\n  \"Madagascar\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MG\",\n    \"Code3\": \"MDG\"\n  },\n  \"Malaysia\": {\n    \"label\": \"State/Territory\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"State/Territory\",\n    \"provinces\": [\n      \"Johor\",\n      \"Kedah\",\n      \"Kelantan\",\n      \"Kuala Lumpur\",\n      \"Labuan\",\n      \"Melaka\",\n      \"Negeri Sembilan\",\n      \"Pahang\",\n      \"Perak\",\n      \"Perlis\",\n      \"Pulau Pinang\",\n      \"Putrajaya\",\n      \"Sabah\",\n      \"Sarawak\",\n      \"Selangor\",\n      \"Terengganu\"\n    ],\n    \"province_labels\": {\n      \"Johor\": \"Johor\",\n      \"Kedah\": \"Kedah\",\n      \"Kelantan\": \"Kelantan\",\n      \"Kuala Lumpur\": \"Kuala Lumpur\",\n      \"Labuan\": \"Labuan\",\n      \"Melaka\": \"Melaka\",\n      \"Negeri Sembilan\": \"Negeri Sembilan\",\n      \"Pahang\": \"Pahang\",\n      \"Perak\": \"Perak\",\n      \"Perlis\": \"Perlis\",\n      \"Pulau Pinang\": \"Pulau Pinang\",\n      \"Putrajaya\": \"Putrajaya\",\n      \"Sabah\": \"Sabah\",\n      \"Sarawak\": \"Sarawak\",\n      \"Selangor\": \"Selangor\",\n      \"Terengganu\": \"Terengganu\"\n    },\n    \"province_codes\": {\n      \"Johor\": \"JHR\",\n      \"Kedah\": \"KDH\",\n      \"Kelantan\": \"KTN\",\n      \"Kuala Lumpur\": \"KUL\",\n      \"Labuan\": \"LBN\",\n      \"Melaka\": \"MLK\",\n      \"Negeri Sembilan\": \"NSN\",\n      \"Pahang\": \"PHG\",\n      \"Perak\": \"PRK\",\n      \"Perlis\": \"PLS\",\n      \"Pulau Pinang\": \"PNG\",\n      \"Putrajaya\": \"PJY\",\n      \"Sabah\": \"SBH\",\n      \"Sarawak\": \"SWK\",\n      \"Selangor\": \"SGR\",\n      \"Terengganu\": \"TRG\"\n    },\n    \"Code2\": \"MY\",\n    \"Code3\": \"MYS\"\n  },\n  \"Maldives\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MV\",\n    \"Code3\": \"MDV\"\n  },\n  \"Malta\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MT\",\n    \"Code3\": \"MLT\"\n  },\n  \"Mauritius\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MU\",\n    \"Code3\": \"MUS\"\n  },\n  \"Mexico\": {\n    \"label\": \"State\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"State\",\n    \"provinces\": [\n      \"Aguascalientes\",\n      \"Baja California\",\n      \"Baja California Sur\",\n      \"Chihuahua\",\n      \"Colima\",\n      \"Campeche\",\n      \"Coahuila\",\n      \"Chiapas\",\n      \"Distrito Federal\",\n      \"Durango\",\n      \"Guerrero\",\n      \"Guanajuato\",\n      \"Hidalgo\",\n      \"Jalisco\",\n      \"Michoacán\",\n      \"Morelos\",\n      \"México\",\n      \"Nayarit\",\n      \"Nuevo León\",\n      \"Oaxaca\",\n      \"Puebla\",\n      \"Quintana Roo\",\n      \"Querétaro\",\n      \"Sinaloa\",\n      \"San Luis Potosí\",\n      \"Sonora\",\n      \"Tabasco\",\n      \"Tlaxcala\",\n      \"Tamaulipas\",\n      \"Veracruz\",\n      \"Yucatán\",\n      \"Zacatecas\"\n    ],\n    \"province_labels\": {\n      \"Aguascalientes\": \"Aguascalientes\",\n      \"Baja California\": \"Baja California\",\n      \"Baja California Sur\": \"Baja California Sur\",\n      \"Campeche\": \"Campeche\",\n      \"Chiapas\": \"Chiapas\",\n      \"Chihuahua\": \"Chihuahua\",\n      \"Coahuila\": \"Coahuila\",\n      \"Colima\": \"Colima\",\n      \"Distrito Federal\": \"Distrito Federal\",\n      \"Durango\": \"Durango\",\n      \"Guanajuato\": \"Guanajuato\",\n      \"Guerrero\": \"Guerrero\",\n      \"Hidalgo\": \"Hidalgo\",\n      \"Jalisco\": \"Jalisco\",\n      \"México\": \"México\",\n      \"Michoacán\": \"Michoacán\",\n      \"Morelos\": \"Morelos\",\n      \"Nayarit\": \"Nayarit\",\n      \"Nuevo León\": \"Nuevo León\",\n      \"Oaxaca\": \"Oaxaca\",\n      \"Puebla\": \"Puebla\",\n      \"Querétaro\": \"Querétaro\",\n      \"Quintana Roo\": \"Quintana Roo\",\n      \"San Luis Potosí\": \"San Luis Potosí\",\n      \"Sinaloa\": \"Sinaloa\",\n      \"Sonora\": \"Sonora\",\n      \"Tabasco\": \"Tabasco\",\n      \"Tamaulipas\": \"Tamaulipas\",\n      \"Tlaxcala\": \"Tlaxcala\",\n      \"Veracruz\": \"Veracruz\",\n      \"Yucatán\": \"Yucatán\",\n      \"Zacatecas\": \"Zacatecas\"\n    },\n    \"province_codes\": {\n      \"Aguascalientes\": \"AGS\",\n      \"Baja California\": \"BC\",\n      \"Baja California Sur\": \"BCS\",\n      \"Chihuahua\": \"CHIH\",\n      \"Colima\": \"COL\",\n      \"Campeche\": \"CAMP\",\n      \"Coahuila\": \"COAH\",\n      \"Chiapas\": \"CHIS\",\n      \"Distrito Federal\": \"DF\",\n      \"Durango\": \"DGO\",\n      \"Guerrero\": \"GRO\",\n      \"Guanajuato\": \"GTO\",\n      \"Hidalgo\": \"HGO\",\n      \"Jalisco\": \"JAL\",\n      \"Michoacán\": \"MICH\",\n      \"Morelos\": \"MOR\",\n      \"México\": \"MEX\",\n      \"Nayarit\": \"NAY\",\n      \"Nuevo León\": \"NL\",\n      \"Oaxaca\": \"OAx\",\n      \"Puebla\": \"PUE\",\n      \"Quintana Roo\": \"Q ROO\",\n      \"Querétaro\": \"QRO\",\n      \"Sinaloa\": \"SIN\",\n      \"San Luis Potosí\": \"SLP\",\n      \"Sonora\": \"SON\",\n      \"Tabasco\": \"TAB\",\n      \"Tlaxcala\": \"TLAX\",\n      \"Tamaulipas\": \"TAMPS\",\n      \"Veracruz\": \"VER\",\n      \"Yucatán\": \"YUC\",\n      \"Zacatecas\": \"ZAC\"\n    },\n    \"Code2\": \"MX\",\n    \"Code3\": \"MEX\"\n  },\n  \"Moldova, Republic of\": {\n    \"label\": null,\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MD\",\n    \"Code3\": \"MDA\"\n  },\n  \"Monaco\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MC\",\n    \"Code3\": \"MCO\"\n  },\n  \"Mongolia\": {\n    \"label\": null,\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MN\",\n    \"Code3\": \"MNG\"\n  },\n  \"Montenegro\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"ME\",\n    \"Code3\": \"MNE\"\n  },\n  \"Morocco\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MA\",\n    \"Code3\": \"MAR\"\n  },\n  \"Mozambique\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MZ\",\n    \"Code3\": \"MOZ\"\n  },\n  \"Myanmar\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MM\",\n    \"Code3\": \"MMR\"\n  },\n  \"Namibia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"NA\",\n    \"Code3\": \"NAM\"\n  },\n  \"Nepal\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"NP\",\n    \"Code3\": \"NPL\"\n  },\n  \"Netherlands Antilles\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"AN\",\n    \"Code3\": \"ANT\"\n  },\n  \"Netherlands\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"NL\",\n    \"Code3\": \"NLD\"\n  },\n  \"New Zealand\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": [\n      \"Auckland\",\n      \"Bay of Plenty\",\n      \"Canterbury\",\n      \"Gisborne\",\n      \"Hawke's Bay\",\n      \"Manawatu-Wanganui\",\n      \"Marlborough\",\n      \"Nelson\",\n      \"Northland\",\n      \"Otago\",\n      \"Southland\",\n      \"Taranaki\",\n      \"Tasman\",\n      \"Waikato\",\n      \"Wellington\",\n      \"West Coast\"\n    ],\n    \"province_labels\": {\n      \"Auckland\": \"Auckland\",\n      \"Bay of Plenty\": \"Bay of Plenty\",\n      \"Canterbury\": \"Canterbury\",\n      \"Gisborne\": \"Gisborne\",\n      \"Hawke's Bay\": \"Hawke's Bay\",\n      \"Manawatu-Wanganui\": \"Manawatu-Wanganui\",\n      \"Marlborough\": \"Marlborough\",\n      \"Nelson\": \"Nelson\",\n      \"Northland\": \"Northland\",\n      \"Otago\": \"Otago\",\n      \"Southland\": \"Southland\",\n      \"Taranaki\": \"Taranaki\",\n      \"Tasman\": \"Tasman\",\n      \"Waikato\": \"Waikato\",\n      \"Wellington\": \"Wellington\",\n      \"West Coast\": \"West Coast\"\n    },\n    \"province_codes\": {\n      \"Auckland\": \"AUK\",\n      \"Bay of Plenty\": \"BOP\",\n      \"Canterbury\": \"CAN\",\n      \"Gisborne\": \"GIS\",\n      \"Hawke's Bay\": \"HKB\",\n      \"Manawatu-Wanganui\": \"MWT\",\n      \"Marlborough\": \"MBH\",\n      \"Nelson\": \"NSN\",\n      \"Northland\": \"NTL\",\n      \"Otago\": \"OTA\",\n      \"Southland\": \"STL\",\n      \"Taranaki\": \"TKI\",\n      \"Tasman\": \"TAS\",\n      \"Waikato\": \"WKO\",\n      \"Wellington\": \"WGN\",\n      \"West Coast\": \"WTC\"\n    },\n    \"Code2\": \"NZ\",\n    \"Code3\": \"NZL\"\n  },\n  \"Nicaragua\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"NI\",\n    \"Code3\": \"NIC\"\n  },\n  \"Niger\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"NE\",\n    \"Code3\": \"NER\"\n  },\n  \"Nigeria\": {\n    \"label\": \"State\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"State\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"NG\",\n    \"Code3\": \"NGA\"\n  },\n  \"Norway\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"NO\",\n    \"Code3\": \"NOR\"\n  },\n  \"Oman\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"OM\",\n    \"Code3\": \"OMN\"\n  },\n  \"Pakistan\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"PK\",\n    \"Code3\": \"PAK\"\n  },\n  \"Palestinian Territory, Occupied\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"PS\",\n    \"Code3\": \"PSE\"\n  },\n  \"Panama\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"PA\",\n    \"Code3\": \"PAN\"\n  },\n  \"Papua New Guinea\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"PG\",\n    \"Code3\": \"PNG\"\n  },\n  \"Paraguay\": {\n    \"label\": null,\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"PY\",\n    \"Code3\": \"PRY\"\n  },\n  \"Peru\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"PE\",\n    \"Code3\": \"PER\"\n  },\n  \"Philippines\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"PH\",\n    \"Code3\": \"PHL\"\n  },\n  \"Poland\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"PL\",\n    \"Code3\": \"POL\"\n  },\n  \"Portugal\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": [\n      \"Aveiro\",\n      \"Beja\",\n      \"Braga\",\n      \"Bragança\",\n      \"Castelo Branco\",\n      \"Coimbra\",\n      \"Évora\",\n      \"Faro\",\n      \"Guarda\",\n      \"Leiria\",\n      \"Lisboa\",\n      \"Portalegre\",\n      \"Porto\",\n      \"Santarém\",\n      \"Setúbal\",\n      \"Viana do Castelo\",\n      \"Vila Real\",\n      \"Viseu\",\n      \"Açores\",\n      \"Madeira\"\n    ],\n    \"province_labels\": {\n      \"Açores\": \"Açores\",\n      \"Aveiro\": \"Aveiro\",\n      \"Beja\": \"Beja\",\n      \"Braga\": \"Braga\",\n      \"Bragança\": \"Bragança\",\n      \"Castelo Branco\": \"Castelo Branco\",\n      \"Coimbra\": \"Coimbra\",\n      \"Évora\": \"Évora\",\n      \"Faro\": \"Faro\",\n      \"Guarda\": \"Guarda\",\n      \"Leiria\": \"Leiria\",\n      \"Lisboa\": \"Lisboa\",\n      \"Madeira\": \"Madeira\",\n      \"Portalegre\": \"Portalegre\",\n      \"Porto\": \"Porto\",\n      \"Santarém\": \"Santarém\",\n      \"Setúbal\": \"Setúbal\",\n      \"Viana do Castelo\": \"Viana do Castelo\",\n      \"Vila Real\": \"Vila Real\",\n      \"Viseu\": \"Viseu\"\n    },\n    \"province_codes\": {\n      \"Aveiro\": \"PT-01\",\n      \"Beja\": \"PT-02\",\n      \"Braga\": \"PT-03\",\n      \"Bragança\": \"PT-04\",\n      \"Castelo Branco\": \"PT-05\",\n      \"Coimbra\": \"PT-06\",\n      \"Évora\": \"PT-07\",\n      \"Faro\": \"PT-08\",\n      \"Guarda\": \"PT-09\",\n      \"Leiria\": \"PT-10\",\n      \"Lisboa\": \"PT-11\",\n      \"Portalegre\": \"PT-12\",\n      \"Porto\": \"PT-13\",\n      \"Santarém\": \"PT-14\",\n      \"Setúbal\": \"PT-15\",\n      \"Viana do Castelo\": \"PT-16\",\n      \"Vila Real\": \"PT-17\",\n      \"Viseu\": \"PT-18\",\n      \"Açores\": \"PT-20\",\n      \"Madeira\": \"PT-30\"\n    },\n    \"Code2\": \"PT\",\n    \"Code3\": \"PRT\"\n  },\n  \"Qatar\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"QA\",\n    \"Code3\": \"QAT\"\n  },\n  \"Reunion\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"RE\",\n    \"Code3\": \"REU\"\n  },\n  \"Romania\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"RO\",\n    \"Code3\": \"ROU\"\n  },\n  \"Russia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": [\n      \"Republic of Adygeya\",\n      \"Altai Republic\",\n      \"Altai Krai\",\n      \"Amur Oblast\",\n      \"Arkhangelsk Oblast\",\n      \"Astrakhan Oblast\",\n      \"Republic of Bashkortostan\",\n      \"Belgorod Oblast\",\n      \"Bryansk Oblast\",\n      \"Republic of Buryatia\",\n      \"Chechen Republic\",\n      \"Chelyabinsk Oblast\",\n      \"Chukotka Autonomous Okrug\",\n      \"Chuvash Republic\",\n      \"Republic of Dagestan\",\n      \"Republic of Ingushetia\",\n      \"Irkutsk Oblast\",\n      \"Ivanovo Oblast\",\n      \"Kamchatka Krai\",\n      \"Kabardino-Balkarian Republic\",\n      \"Kaliningrad Oblast\",\n      \"Republic of Kalmykia\",\n      \"Kaluga Oblast\",\n      \"Karachay–Cherkess Republic\",\n      \"Republic of Karelia\",\n      \"Kemerovo Oblast\",\n      \"Khabarovsk Krai\",\n      \"Republic of Khakassia\",\n      \"Khanty-Mansi Autonomous Okrug\",\n      \"Kirov Oblast\",\n      \"Komi Republic\",\n      \"Kostroma Oblast\",\n      \"Krasnodar Krai\",\n      \"Krasnoyarsk Krai\",\n      \"Kurgan Oblast\",\n      \"Kursk Oblast\",\n      \"Leningrad Oblast\",\n      \"Lipetsk Oblast\",\n      \"Magadan Oblast\",\n      \"Mari El Republic\",\n      \"Republic of Mordovia\",\n      \"Moscow Oblast\",\n      \"Moscow\",\n      \"Murmansk Oblast\",\n      \"Nizhny Novgorod Oblast\",\n      \"Novgorod Oblast\",\n      \"Novosibirsk Oblast\",\n      \"Omsk Oblast\",\n      \"Orenburg Oblast\",\n      \"Oryol Oblast\",\n      \"Penza Oblast\",\n      \"Perm Krai\",\n      \"Primorsky Krai\",\n      \"Pskov Oblast\",\n      \"Rostov Oblast\",\n      \"Ryazan Oblast\",\n      \"Sakha Republic (Yakutia)\",\n      \"Sakhalin Oblast\",\n      \"Samara Oblast\",\n      \"Saint Petersburg\",\n      \"Saratov Oblast\",\n      \"Republic of North Ossetia–Alania\",\n      \"Smolensk Oblast\",\n      \"Stavropol Krai\",\n      \"Sverdlovsk Oblast\",\n      \"Tambov Oblast\",\n      \"Republic of Tatarstan\",\n      \"Tomsk Oblast\",\n      \"Tula Oblast\",\n      \"Tver Oblast\",\n      \"Tyumen Oblast\",\n      \"Tyva Republic\",\n      \"Udmurtia\",\n      \"Ulyanovsk Oblast\",\n      \"Vladimir Oblast\",\n      \"Volgograd Oblast\",\n      \"Vologda Oblast\",\n      \"Voronezh Oblast\",\n      \"Yamalo-Nenets Autonomous Okrug\",\n      \"Yaroslavl Oblast\",\n      \"Jewish Autonomous Oblast\"\n    ],\n    \"province_labels\": {\n      \"Altai Krai\": \"Altai Krai\",\n      \"Altai Republic\": \"Altai Republic\",\n      \"Amur Oblast\": \"Amur Oblast\",\n      \"Arkhangelsk Oblast\": \"Arkhangelsk Oblast\",\n      \"Astrakhan Oblast\": \"Astrakhan Oblast\",\n      \"Belgorod Oblast\": \"Belgorod Oblast\",\n      \"Bryansk Oblast\": \"Bryansk Oblast\",\n      \"Chechen Republic\": \"Chechen Republic\",\n      \"Chelyabinsk Oblast\": \"Chelyabinsk Oblast\",\n      \"Chukotka Autonomous Okrug\": \"Chukotka Autonomous Okrug\",\n      \"Chuvash Republic\": \"Chuvash Republic\",\n      \"Irkutsk Oblast\": \"Irkutsk Oblast\",\n      \"Ivanovo Oblast\": \"Ivanovo Oblast\",\n      \"Jewish Autonomous Oblast\": \"Jewish Autonomous Oblast\",\n      \"Kabardino-Balkarian Republic\": \"Kabardino-Balkarian Republic\",\n      \"Kaliningrad Oblast\": \"Kaliningrad Oblast\",\n      \"Kaluga Oblast\": \"Kaluga Oblast\",\n      \"Kamchatka Krai\": \"Kamchatka Krai\",\n      \"Karachay–Cherkess Republic\": \"Karachay–Cherkess Republic\",\n      \"Kemerovo Oblast\": \"Kemerovo Oblast\",\n      \"Khabarovsk Krai\": \"Khabarovsk Krai\",\n      \"Khanty-Mansi Autonomous Okrug\": \"Khanty-Mansi Autonomous Okrug\",\n      \"Kirov Oblast\": \"Kirov Oblast\",\n      \"Komi Republic\": \"Komi Republic\",\n      \"Kostroma Oblast\": \"Kostroma Oblast\",\n      \"Krasnodar Krai\": \"Krasnodar Krai\",\n      \"Krasnoyarsk Krai\": \"Krasnoyarsk Krai\",\n      \"Kurgan Oblast\": \"Kurgan Oblast\",\n      \"Kursk Oblast\": \"Kursk Oblast\",\n      \"Leningrad Oblast\": \"Leningrad Oblast\",\n      \"Lipetsk Oblast\": \"Lipetsk Oblast\",\n      \"Magadan Oblast\": \"Magadan Oblast\",\n      \"Mari El Republic\": \"Mari El Republic\",\n      \"Moscow\": \"Moscow\",\n      \"Moscow Oblast\": \"Moscow Oblast\",\n      \"Murmansk Oblast\": \"Murmansk Oblast\",\n      \"Nizhny Novgorod Oblast\": \"Nizhny Novgorod Oblast\",\n      \"Novgorod Oblast\": \"Novgorod Oblast\",\n      \"Novosibirsk Oblast\": \"Novosibirsk Oblast\",\n      \"Omsk Oblast\": \"Omsk Oblast\",\n      \"Orenburg Oblast\": \"Orenburg Oblast\",\n      \"Oryol Oblast\": \"Oryol Oblast\",\n      \"Penza Oblast\": \"Penza Oblast\",\n      \"Perm Krai\": \"Perm Krai\",\n      \"Primorsky Krai\": \"Primorsky Krai\",\n      \"Pskov Oblast\": \"Pskov Oblast\",\n      \"Republic of Adygeya\": \"Republic of Adygeya\",\n      \"Republic of Bashkortostan\": \"Republic of Bashkortostan\",\n      \"Republic of Buryatia\": \"Republic of Buryatia\",\n      \"Republic of Dagestan\": \"Republic of Dagestan\",\n      \"Republic of Ingushetia\": \"Republic of Ingushetia\",\n      \"Republic of Kalmykia\": \"Republic of Kalmykia\",\n      \"Republic of Karelia\": \"Republic of Karelia\",\n      \"Republic of Khakassia\": \"Republic of Khakassia\",\n      \"Republic of Mordovia\": \"Republic of Mordovia\",\n      \"Republic of North Ossetia–Alania\": \"Republic of North Ossetia–Alania\",\n      \"Republic of Tatarstan\": \"Republic of Tatarstan\",\n      \"Rostov Oblast\": \"Rostov Oblast\",\n      \"Ryazan Oblast\": \"Ryazan Oblast\",\n      \"Saint Petersburg\": \"Saint Petersburg\",\n      \"Sakha Republic (Yakutia)\": \"Sakha Republic (Yakutia)\",\n      \"Sakhalin Oblast\": \"Sakhalin Oblast\",\n      \"Samara Oblast\": \"Samara Oblast\",\n      \"Saratov Oblast\": \"Saratov Oblast\",\n      \"Smolensk Oblast\": \"Smolensk Oblast\",\n      \"Stavropol Krai\": \"Stavropol Krai\",\n      \"Sverdlovsk Oblast\": \"Sverdlovsk Oblast\",\n      \"Tambov Oblast\": \"Tambov Oblast\",\n      \"Tomsk Oblast\": \"Tomsk Oblast\",\n      \"Tula Oblast\": \"Tula Oblast\",\n      \"Tver Oblast\": \"Tver Oblast\",\n      \"Tyumen Oblast\": \"Tyumen Oblast\",\n      \"Tyva Republic\": \"Tyva Republic\",\n      \"Udmurtia\": \"Udmurtia\",\n      \"Ulyanovsk Oblast\": \"Ulyanovsk Oblast\",\n      \"Vladimir Oblast\": \"Vladimir Oblast\",\n      \"Volgograd Oblast\": \"Volgograd Oblast\",\n      \"Vologda Oblast\": \"Vologda Oblast\",\n      \"Voronezh Oblast\": \"Voronezh Oblast\",\n      \"Yamalo-Nenets Autonomous Okrug\": \"Yamalo-Nenets Autonomous Okrug\",\n      \"Yaroslavl Oblast\": \"Yaroslavl Oblast\"\n    },\n    \"province_codes\": {\n      \"Republic of Adygeya\": \"AD\",\n      \"Altai Republic\": \"AL\",\n      \"Altai Krai\": \"ALT\",\n      \"Amur Oblast\": \"AMU\",\n      \"Arkhangelsk Oblast\": \"ARK\",\n      \"Astrakhan Oblast\": \"AST\",\n      \"Republic of Bashkortostan\": \"BA\",\n      \"Belgorod Oblast\": \"BEL\",\n      \"Bryansk Oblast\": \"BRY\",\n      \"Republic of Buryatia\": \"BU\",\n      \"Chechen Republic\": \"CE\",\n      \"Chelyabinsk Oblast\": \"CHE\",\n      \"Chukotka Autonomous Okrug\": \"CHU\",\n      \"Chuvash Republic\": \"CU\",\n      \"Republic of Dagestan\": \"DA\",\n      \"Republic of Ingushetia\": \"IN\",\n      \"Irkutsk Oblast\": \"IRK\",\n      \"Ivanovo Oblast\": \"IVA\",\n      \"Kamchatka Krai\": \"KAM\",\n      \"Kabardino-Balkarian Republic\": \"KB\",\n      \"Kaliningrad Oblast\": \"KGD\",\n      \"Republic of Kalmykia\": \"KL\",\n      \"Kaluga Oblast\": \"KLU\",\n      \"Karachay–Cherkess Republic\": \"KC\",\n      \"Republic of Karelia\": \"KR\",\n      \"Kemerovo Oblast\": \"KEM\",\n      \"Khabarovsk Krai\": \"KHA\",\n      \"Republic of Khakassia\": \"KK\",\n      \"Khanty-Mansi Autonomous Okrug\": \"KHM\",\n      \"Kirov Oblast\": \"KIR\",\n      \"Komi Republic\": \"KO\",\n      \"Kostroma Oblast\": \"KOS\",\n      \"Krasnodar Krai\": \"KDA\",\n      \"Krasnoyarsk Krai\": \"KYA\",\n      \"Kurgan Oblast\": \"KGN\",\n      \"Kursk Oblast\": \"KRS\",\n      \"Leningrad Oblast\": \"LEN\",\n      \"Lipetsk Oblast\": \"LIP\",\n      \"Magadan Oblast\": \"MAG\",\n      \"Mari El Republic\": \"ME\",\n      \"Republic of Mordovia\": \"MO\",\n      \"Moscow Oblast\": \"MOS\",\n      \"Moscow\": \"MOW\",\n      \"Murmansk Oblast\": \"MUR\",\n      \"Nizhny Novgorod Oblast\": \"NIZ\",\n      \"Novgorod Oblast\": \"NGR\",\n      \"Novosibirsk Oblast\": \"NVS\",\n      \"Omsk Oblast\": \"OMS\",\n      \"Orenburg Oblast\": \"ORE\",\n      \"Oryol Oblast\": \"ORL\",\n      \"Penza Oblast\": \"PNZ\",\n      \"Perm Krai\": \"PER\",\n      \"Primorsky Krai\": \"PRI\",\n      \"Pskov Oblast\": \"PSK\",\n      \"Rostov Oblast\": \"ROS\",\n      \"Ryazan Oblast\": \"RYA\",\n      \"Sakha Republic (Yakutia)\": \"SA\",\n      \"Sakhalin Oblast\": \"SAK\",\n      \"Samara Oblast\": \"SAM\",\n      \"Saint Petersburg\": \"SPE\",\n      \"Saratov Oblast\": \"SAR\",\n      \"Republic of North Ossetia–Alania\": \"SE\",\n      \"Smolensk Oblast\": \"SMO\",\n      \"Stavropol Krai\": \"STA\",\n      \"Sverdlovsk Oblast\": \"SVE\",\n      \"Tambov Oblast\": \"TAM\",\n      \"Republic of Tatarstan\": \"TA\",\n      \"Tomsk Oblast\": \"TOM\",\n      \"Tula Oblast\": \"TUL\",\n      \"Tver Oblast\": \"TVE\",\n      \"Tyumen Oblast\": \"TYU\",\n      \"Tyva Republic\": \"TY\",\n      \"Udmurtia\": \"UD\",\n      \"Ulyanovsk Oblast\": \"ULY\",\n      \"Vladimir Oblast\": \"VLA\",\n      \"Volgograd Oblast\": \"VGG\",\n      \"Vologda Oblast\": \"VLG\",\n      \"Voronezh Oblast\": \"VOR\",\n      \"Yamalo-Nenets Autonomous Okrug\": \"YAN\",\n      \"Yaroslavl Oblast\": \"YAR\",\n      \"Jewish Autonomous Oblast\": \"YEV\"\n    },\n    \"Code2\": \"RU\",\n    \"Code3\": \"RUS\"\n  },\n  \"Rwanda\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"RW\",\n    \"Code3\": \"RWA\"\n  },\n  \"Saint Kitts And Nevis\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"KN\",\n    \"Code3\": \"KNA\"\n  },\n  \"Saint Lucia\": {\n    \"label\": null,\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"LC\",\n    \"Code3\": \"LCA\"\n  },\n  \"Saint Martin\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MF\",\n    \"Code3\": \"MAF\"\n  },\n  \"Sao Tome And Principe\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"ST\",\n    \"Code3\": \"STP\"\n  },\n  \"Samoa\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"WS\",\n    \"Code3\": \"WSM\"\n  },\n  \"Saudi Arabia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SA\",\n    \"Code3\": \"SAU\"\n  },\n  \"Senegal\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SN\",\n    \"Code3\": \"SEN\"\n  },\n  \"Serbia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"RS\",\n    \"Code3\": \"SRB\"\n  },\n  \"Seychelles\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SC\",\n    \"Code3\": \"SYC\"\n  },\n  \"Singapore\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SG\",\n    \"Code3\": \"SGP\"\n  },\n  \"Sint Maarten\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SX\",\n    \"Code3\": \"SXM\"\n  },\n  \"Slovakia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SK\",\n    \"Code3\": \"SVK\"\n  },\n  \"Slovenia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SI\",\n    \"Code3\": \"SVN\"\n  },\n  \"South Africa\": {\n    \"label\": \"Province\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Province\",\n    \"provinces\": [\n      \"Eastern Cape\",\n      \"Free State\",\n      \"Gauteng\",\n      \"KwaZulu-Natal\",\n      \"Limpopo\",\n      \"Mpumalanga\",\n      \"Northern Cape\",\n      \"North West\",\n      \"Western Cape\"\n    ],\n    \"province_labels\": {\n      \"Eastern Cape\": \"Eastern Cape\",\n      \"Free State\": \"Free State\",\n      \"Gauteng\": \"Gauteng\",\n      \"KwaZulu-Natal\": \"KwaZulu-Natal\",\n      \"Limpopo\": \"Limpopo\",\n      \"Mpumalanga\": \"Mpumalanga\",\n      \"North West\": \"North West\",\n      \"Northern Cape\": \"Northern Cape\",\n      \"Western Cape\": \"Western Cape\"\n    },\n    \"province_codes\": {\n      \"Eastern Cape\": \"EC\",\n      \"Free State\": \"FS\",\n      \"Gauteng\": \"GT\",\n      \"KwaZulu-Natal\": \"NL\",\n      \"Limpopo\": \"LP\",\n      \"Mpumalanga\": \"MP\",\n      \"Northern Cape\": \"NC\",\n      \"North West\": \"NW\",\n      \"Western Cape\": \"WC\"\n    },\n    \"Code2\": \"ZA\",\n    \"Code3\": \"ZAF\"\n  },\n  \"South Korea\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"KR\",\n    \"Code3\": \"KOR\"\n  },\n  \"Spain\": {\n    \"label\": \"Province\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Province\",\n    \"provinces\": [\n      \"A Coruña\",\n      \"Álava\",\n      \"Albacete\",\n      \"Alicante\",\n      \"Almería\",\n      \"Asturias\",\n      \"Ávila\",\n      \"Badajoz\",\n      \"Balears\",\n      \"Barcelona\",\n      \"Burgos\",\n      \"Cáceres\",\n      \"Cádiz\",\n      \"Cantabria\",\n      \"Castellón\",\n      \"Ceuta\",\n      \"Ciudad Real\",\n      \"Córdoba\",\n      \"Cuenca\",\n      \"Girona\",\n      \"Granada\",\n      \"Guadalajara\",\n      \"Guipúzcoa\",\n      \"Huelva\",\n      \"Huesca\",\n      \"Jaén\",\n      \"La Rioja\",\n      \"Las Palmas\",\n      \"León\",\n      \"Lleida\",\n      \"Lugo\",\n      \"Madrid\",\n      \"Málaga\",\n      \"Melilla\",\n      \"Murcia\",\n      \"Navarra\",\n      \"Ourense\",\n      \"Palencia\",\n      \"Pontevedra\",\n      \"Salamanca\",\n      \"Santa Cruz de Tenerife\",\n      \"Segovia\",\n      \"Sevilla\",\n      \"Soria\",\n      \"Tarragona\",\n      \"Teruel\",\n      \"Toledo\",\n      \"Valencia\",\n      \"Valladolid\",\n      \"Vizcaya\",\n      \"Zamora\",\n      \"Zaragoza\"\n    ],\n    \"province_labels\": {\n      \"A Coruña\": \"A Coruña\",\n      \"Álava\": \"Álava\",\n      \"Albacete\": \"Albacete\",\n      \"Alicante\": \"Alicante\",\n      \"Almería\": \"Almería\",\n      \"Asturias\": \"Asturias\",\n      \"Ávila\": \"Ávila\",\n      \"Badajoz\": \"Badajoz\",\n      \"Balears\": \"Balears\",\n      \"Barcelona\": \"Barcelona\",\n      \"Burgos\": \"Burgos\",\n      \"Cáceres\": \"Cáceres\",\n      \"Cádiz\": \"Cádiz\",\n      \"Cantabria\": \"Cantabria\",\n      \"Castellón\": \"Castellón\",\n      \"Ceuta\": \"Ceuta\",\n      \"Ciudad Real\": \"Ciudad Real\",\n      \"Córdoba\": \"Córdoba\",\n      \"Cuenca\": \"Cuenca\",\n      \"Girona\": \"Girona\",\n      \"Granada\": \"Granada\",\n      \"Guadalajara\": \"Guadalajara\",\n      \"Guipúzcoa\": \"Guipúzcoa\",\n      \"Huelva\": \"Huelva\",\n      \"Huesca\": \"Huesca\",\n      \"Jaén\": \"Jaén\",\n      \"La Rioja\": \"La Rioja\",\n      \"Las Palmas\": \"Las Palmas\",\n      \"León\": \"León\",\n      \"Lleida\": \"Lleida\",\n      \"Lugo\": \"Lugo\",\n      \"Madrid\": \"Madrid\",\n      \"Málaga\": \"Málaga\",\n      \"Melilla\": \"Melilla\",\n      \"Murcia\": \"Murcia\",\n      \"Navarra\": \"Navarra\",\n      \"Ourense\": \"Ourense\",\n      \"Palencia\": \"Palencia\",\n      \"Pontevedra\": \"Pontevedra\",\n      \"Salamanca\": \"Salamanca\",\n      \"Santa Cruz de Tenerife\": \"Santa Cruz de Tenerife\",\n      \"Segovia\": \"Segovia\",\n      \"Sevilla\": \"Sevilla\",\n      \"Soria\": \"Soria\",\n      \"Tarragona\": \"Tarragona\",\n      \"Teruel\": \"Teruel\",\n      \"Toledo\": \"Toledo\",\n      \"Valencia\": \"Valencia\",\n      \"Valladolid\": \"Valladolid\",\n      \"Vizcaya\": \"Vizcaya\",\n      \"Zamora\": \"Zamora\",\n      \"Zaragoza\": \"Zaragoza\"\n    },\n    \"province_codes\": {\n      \"A Coruña\": \"C\",\n      \"Álava\": \"VI\",\n      \"Albacete\": \"AB\",\n      \"Alicante\": \"A\",\n      \"Almería\": \"AL\",\n      \"Asturias\": \"O\",\n      \"Ávila\": \"AV\",\n      \"Badajoz\": \"BA\",\n      \"Balears\": \"PM\",\n      \"Barcelona\": \"B\",\n      \"Burgos\": \"BU\",\n      \"Cáceres\": \"CC\",\n      \"Cádiz\": \"CA\",\n      \"Cantabria\": \"S\",\n      \"Castellón\": \"CS\",\n      \"Ceuta\": \"CE\",\n      \"Ciudad Real\": \"CR\",\n      \"Córdoba\": \"CO\",\n      \"Cuenca\": \"CU\",\n      \"Girona\": \"GI\",\n      \"Granada\": \"GR\",\n      \"Guadalajara\": \"GU\",\n      \"Guipúzcoa\": \"SS\",\n      \"Huelva\": \"H\",\n      \"Huesca\": \"HU\",\n      \"Jaén\": \"J\",\n      \"La Rioja\": \"LO\",\n      \"Las Palmas\": \"GC\",\n      \"León\": \"LE\",\n      \"Lleida\": \"L\",\n      \"Lugo\": \"LU\",\n      \"Madrid\": \"M\",\n      \"Málaga\": \"MA\",\n      \"Melilla\": \"ML\",\n      \"Murcia\": \"MU\",\n      \"Navarra\": \"NA\",\n      \"Ourense\": \"OR\",\n      \"Palencia\": \"P\",\n      \"Pontevedra\": \"PO\",\n      \"Salamanca\": \"SA\",\n      \"Santa Cruz de Tenerife\": \"TF\",\n      \"Segovia\": \"SG\",\n      \"Sevilla\": \"SE\",\n      \"Soria\": \"SO\",\n      \"Tarragona\": \"T\",\n      \"Teruel\": \"TE\",\n      \"Toledo\": \"TO\",\n      \"Valencia\": \"V\",\n      \"Valladolid\": \"VA\",\n      \"Vizcaya\": \"BI\",\n      \"Zamora\": \"ZA\",\n      \"Zaragoza\": \"Z\"\n    },\n    \"Code2\": \"ES\",\n    \"Code3\": \"ESP\"\n  },\n  \"Sri Lanka\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"LK\",\n    \"Code3\": \"LKA\"\n  },\n  \"St. Vincent\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"VC\",\n    \"Code3\": \"VCT\"\n  },\n  \"Suriname\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SR\",\n    \"Code3\": \"SUR\"\n  },\n  \"Sweden\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SE\",\n    \"Code3\": \"SWE\"\n  },\n  \"Switzerland\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CH\",\n    \"Code3\": \"CHE\"\n  },\n  \"Syria\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SY\",\n    \"Code3\": \"SYR\"\n  },\n  \"Taiwan\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TW\",\n    \"Code3\": \"TWN\"\n  },\n  \"Thailand\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TH\",\n    \"Code3\": \"THA\"\n  },\n  \"Tanzania, United Republic Of\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TZ\",\n    \"Code3\": \"TZA\"\n  },\n  \"Trinidad and Tobago\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TT\",\n    \"Code3\": \"TTO\"\n  },\n  \"Tunisia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TN\",\n    \"Code3\": \"TUN\"\n  },\n  \"Turkey\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TR\",\n    \"Code3\": \"TUR\"\n  },\n  \"Turkmenistan\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TM\",\n    \"Code3\": \"TKM\"\n  },\n  \"Turks and Caicos Islands\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TC\",\n    \"Code3\": \"TCA\"\n  },\n  \"Uganda\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"UG\",\n    \"Code3\": \"UGA\"\n  },\n  \"Ukraine\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"UA\",\n    \"Code3\": \"UKR\"\n  },\n  \"United Arab Emirates\": {\n    \"label\": \"Emirate\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": [\n      \"Abu Dhabi\",\n      \"Ajman\",\n      \"Dubai\",\n      \"Fujairah\",\n      \"Ras al-Khaimah\",\n      \"Sharjah\",\n      \"Umm al-Quwain\"\n    ],\n    \"province_labels\": {\n      \"Abu Dhabi\": \"Abu Dhabi\",\n      \"Ajman\": \"Ajman\",\n      \"Dubai\": \"Dubai\",\n      \"Fujairah\": \"Fujairah\",\n      \"Ras al-Khaimah\": \"Ras al-Khaimah\",\n      \"Sharjah\": \"Sharjah\",\n      \"Umm al-Quwain\": \"Umm al-Quwain\"\n    },\n    \"province_codes\": {\n      \"Abu Dhabi\": \"AZ\",\n      \"Ajman\": \"AJ\",\n      \"Dubai\": \"DU\",\n      \"Fujairah\": \"FU\",\n      \"Ras al-Khaimah\": \"RK\",\n      \"Sharjah\": \"SH\",\n      \"Umm al-Quwain\": \"UQ\"\n    },\n    \"Code2\": \"AE\",\n    \"Code3\": \"ARE\"\n  },\n  \"Uruguay\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"UY\",\n    \"Code3\": \"URY\"\n  },\n  \"Uzbekistan\": {\n    \"label\": \"Province\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Province\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"UZ\",\n    \"Code3\": \"UZB\"\n  },\n  \"Vanuatu\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"VU\",\n    \"Code3\": \"VUT\"\n  },\n  \"Venezuela\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"VE\",\n    \"Code3\": \"VEN\"\n  },\n  \"Vietnam\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"VN\",\n    \"Code3\": \"VNM\"\n  },\n  \"Virgin Islands, British\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"VG\",\n    \"Code3\": \"VGB\"\n  },\n  \"Yemen\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"YE\",\n    \"Code3\": \"YEM\"\n  },\n  \"Zambia\": {\n    \"label\": null,\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"ZM\",\n    \"Code3\": \"ZMB\"\n  },\n  \"Zimbabwe\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"ZW\",\n    \"Code3\": \"ZWE\"\n  },\n  \"Afghanistan\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"AF\",\n    \"Code3\": \"AFG\"\n  },\n  \"Aland Islands\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"AL\",\n    \"Code3\": \"ALA\"\n  },\n  \"Anguilla\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"AI\",\n    \"Code3\": \"AIA\"\n  },\n  \"Benin\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BJ\",\n    \"Code3\": \"BEN\"\n  },\n  \"Bouvet Island\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BV\",\n    \"Code3\": \"BVT\"\n  },\n  \"British Indian Ocean Territory\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"IO\",\n    \"Code3\": \"IOT\"\n  },\n  \"Burkina Faso\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BF\",\n    \"Code3\": \"BFA\"\n  },\n  \"Burundi\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BI\",\n    \"Code3\": \"BDI\"\n  },\n  \"Cape Verde\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CP\",\n    \"Code3\": \"CPV\"\n  },\n  \"Central African Republic\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CF\",\n    \"Code3\": \"CAF\"\n  },\n  \"Chad\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TD\",\n    \"Code3\": \"TCD\"\n  },\n  \"Christmas Island\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CX\",\n    \"Code3\": \"CXR\"\n  },\n  \"Cocos (Keeling) Islands\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CC\",\n    \"Code3\": \"CCK\"\n  },\n  \"Congo, The Democratic Republic Of The\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CO\",\n    \"Code3\": \"COD\"\n  },\n  \"Cook Islands\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CK\",\n    \"Code3\": \"COK\"\n  },\n  \"Cuba\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"CU\",\n    \"Code3\": \"CUB\"\n  },\n  \"Djibouti\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"DJ\",\n    \"Code3\": \"DJI\"\n  },\n  \"Equatorial Guinea\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GQ\",\n    \"Code3\": \"GNQ\"\n  },\n  \"Eritrea\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"ER\",\n    \"Code3\": \"ERI\"\n  },\n  \"Falkland Islands (Malvinas)\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"FK\",\n    \"Code3\": \"FLK\"\n  },\n  \"French Guiana\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GF\",\n    \"Code3\": \"GUF\"\n  },\n  \"French Southern Territories\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TF\",\n    \"Code3\": \"ATF\"\n  },\n  \"Gabon\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GA\",\n    \"Code3\": \"GAB\"\n  },\n  \"Guinea\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GN\",\n    \"Code3\": \"GIN\"\n  },\n  \"Guinea Bissau\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GW\",\n    \"Code3\": \"GNB\"\n  },\n  \"Heard Island And Mcdonald Islands\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"HM\",\n    \"Code3\": \"HMD\"\n  },\n  \"Holy See (Vatican City State)\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"VA\",\n    \"Code3\": \"VAT\"\n  },\n  \"Iran, Islamic Republic Of\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"IR\",\n    \"Code3\": \"IRN\"\n  },\n  \"Iraq\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"IQ\",\n    \"Code3\": \"IRQ\"\n  },\n  \"Kiribati\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"KI\",\n    \"Code3\": \"KIR\"\n  },\n  \"Korea, Democratic People's Republic Of\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"KP\",\n    \"Code3\": \"PRK\"\n  },\n  \"Lao People's Democratic Republic\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"LA\",\n    \"Code3\": \"LAO\"\n  },\n  \"Lesotho\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"LS\",\n    \"Code3\": \"LSO\"\n  },\n  \"Libyan Arab Jamahiriya\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"LY\",\n    \"Code3\": \"LBY\"\n  },\n  \"Malawi\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MW\",\n    \"Code3\": \"MWI\"\n  },\n  \"Mali\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"ML\",\n    \"Code3\": \"MLI\"\n  },\n  \"Martinique\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MQ\",\n    \"Code3\": \"MTQ\"\n  },\n  \"Mauritania\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MR\",\n    \"Code3\": \"MRT\"\n  },\n  \"Mayotte\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"YT\",\n    \"Code3\": \"MYT\"\n  },\n  \"Montserrat\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"MS\",\n    \"Code3\": \"MSR\"\n  },\n  \"Nauru\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"NR\",\n    \"Code3\": \"NRU\"\n  },\n  \"New Caledonia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"NC\",\n    \"Code3\": \"NCL\"\n  },\n  \"Niue\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"NU\",\n    \"Code3\": \"NIU\"\n  },\n  \"Norfolk Island\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"NF\",\n    \"Code3\": \"NFK\"\n  },\n  \"Pitcairn\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"PN\",\n    \"Code3\": \"PCN\"\n  },\n  \"Saint Barthélemy\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"BL\",\n    \"Code3\": \"BLM\"\n  },\n  \"Saint Helena\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SH\",\n    \"Code3\": \"SHN\"\n  },\n  \"Saint Pierre And Miquelon\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"PM\",\n    \"Code3\": \"SPM\"\n  },\n  \"San Marino\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SM\",\n    \"Code3\": \"SMR\"\n  },\n  \"Sierra Leone\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SL\",\n    \"Code3\": \"SLE\"\n  },\n  \"Solomon Islands\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SB\",\n    \"Code3\": \"SLB\"\n  },\n  \"Somalia\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SO\",\n    \"Code3\": \"SOM\"\n  },\n  \"South Georgia And The South Sandwich Islands\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"GS\",\n    \"Code3\": \"SGS\"\n  },\n  \"Sudan\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SD\",\n    \"Code3\": \"SDN\"\n  },\n  \"Svalbard And Jan Mayen\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SJ\",\n    \"Code3\": \"SJM\"\n  },\n  \"Swaziland\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"SZ\",\n    \"Code3\": \"SWZ\"\n  },\n  \"Tajikistan\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TJ\",\n    \"Code3\": \"TJK\"\n  },\n  \"Timor Leste\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TL\",\n    \"Code3\": \"TLS\"\n  },\n  \"Togo\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TG\",\n    \"Code3\": \"TGO\"\n  },\n  \"Tokelau\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TK\",\n    \"Code3\": \"TKL\"\n  },\n  \"Tonga\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TO\",\n    \"Code3\": \"TON\"\n  },\n  \"Tuvalu\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": false,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"TV\",\n    \"Code3\": \"TUV\"\n  },\n  \"United States Minor Outlying Islands\": {\n    \"label\": \"State\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"State\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"UM\",\n    \"Code3\": \"UMI\"\n  },\n  \"Wallis And Futuna\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"WF\",\n    \"Code3\": \"WLF\"\n  },\n  \"Western Sahara\": {\n    \"label\": \"Region\",\n    \"zip_label\": \"Postal code\",\n    \"zip_placeholder\": \"Postal code\",\n    \"zip_required\": true,\n    \"provinces_beta\": null,\n    \"province_label\": \"Region\",\n    \"provinces\": null,\n    \"province_labels\": null,\n    \"province_codes\": {},\n    \"Code2\": \"EH\",\n    \"Code3\": \"ESH\"\n  }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/css/site.css",
    "content": "html {\n    height: 100%;\n    width: 100%;\n}\n\nbody {\n    background: #00abec\n} \n#feature {\n    width: 960px;\n    margin: 95px auto 0 auto;\n    overflow: auto;\n}\n\n#content {\n    font-family: \"Segoe UI\", sans-serif;\n    font-weight: normal;\n    font-size: 26px;\n    color: #ffffff;\n    float: left;\n    width: 460px;\n    margin-top: 68px;\n    margin-left: 0px;\n    vertical-align: middle;\n}\n\n    #content h1 {\n        font-family: \"Segoe UI Light\", sans-serif;\n        color: #ffffff;\n        font-weight: normal;\n        font-size: 70px;\n        line-height: 48pt;\n        width: 800px;\n        padding-bottom: 15px;\n    }\n\np a, p a:visited, p a:active, p a:hover {\n    color: #ffffff;\n}\n\n#content a.button {\n    background: #0DBCF2;\n    border: 1px solid #FFFFFF;\n    color: #FFFFFF;\n    display: inline-block;\n    font-family: Segoe UI, sans-serif;\n    font-size: 24px;\n    line-height: 46px;\n    margin-top: 10px;\n    padding: 0 15px 3px;\n    text-decoration: none;\n}\n\n#content a.button img {\n        float: right;\n        padding: 10px 0 0 15px;\n}\n\n#content a.button:hover {\n        background: #1C75BC;\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/js/site.js",
    "content": "// Write your JavaScript code.\n"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/bootstrap/.bower.json",
    "content": "{\n  \"name\": \"bootstrap\",\n  \"description\": \"The most popular front-end framework for developing responsive, mobile first projects on the web.\",\n  \"keywords\": [\n    \"css\",\n    \"js\",\n    \"less\",\n    \"mobile-first\",\n    \"responsive\",\n    \"front-end\",\n    \"framework\",\n    \"web\"\n  ],\n  \"homepage\": \"http://getbootstrap.com\",\n  \"license\": \"MIT\",\n  \"moduleType\": \"globals\",\n  \"main\": [\n    \"less/bootstrap.less\",\n    \"dist/js/bootstrap.js\"\n  ],\n  \"ignore\": [\n    \"/.*\",\n    \"_config.yml\",\n    \"CNAME\",\n    \"composer.json\",\n    \"CONTRIBUTING.md\",\n    \"docs\",\n    \"js/tests\",\n    \"test-infra\"\n  ],\n  \"dependencies\": {\n    \"jquery\": \"1.9.1 - 3\"\n  },\n  \"version\": \"3.3.7\",\n  \"_release\": \"3.3.7\",\n  \"_resolution\": {\n    \"type\": \"version\",\n    \"tag\": \"v3.3.7\",\n    \"commit\": \"0b9c4a4007c44201dce9a6cc1a38407005c26c86\"\n  },\n  \"_source\": \"https://github.com/twbs/bootstrap.git\",\n  \"_target\": \"v3.3.7\",\n  \"_originalSource\": \"bootstrap\",\n  \"_direct\": true\n}"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/bootstrap/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2011-2016 Twitter, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css",
    "content": "/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);\n}\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n}\n.btn-default.disabled,\n.btn-primary.disabled,\n.btn-success.disabled,\n.btn-info.disabled,\n.btn-warning.disabled,\n.btn-danger.disabled,\n.btn-default[disabled],\n.btn-primary[disabled],\n.btn-success[disabled],\n.btn-info[disabled],\n.btn-warning[disabled],\n.btn-danger[disabled],\nfieldset[disabled] .btn-default,\nfieldset[disabled] .btn-primary,\nfieldset[disabled] .btn-success,\nfieldset[disabled] .btn-info,\nfieldset[disabled] .btn-warning,\nfieldset[disabled] .btn-danger {\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\n.btn-default .badge,\n.btn-primary .badge,\n.btn-success .badge,\n.btn-info .badge,\n.btn-warning .badge,\n.btn-danger .badge {\n  text-shadow: none;\n}\n.btn:active,\n.btn.active {\n  background-image: none;\n}\n.btn-default {\n  text-shadow: 0 1px 0 #fff;\n  background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n  background-image:      -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));\n  background-image:         linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #dbdbdb;\n  border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus {\n  background-color: #e0e0e0;\n  background-position: 0 -15px;\n}\n.btn-default:active,\n.btn-default.active {\n  background-color: #e0e0e0;\n  border-color: #dbdbdb;\n}\n.btn-default.disabled,\n.btn-default[disabled],\nfieldset[disabled] .btn-default,\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus,\n.btn-default.disabled:active,\n.btn-default[disabled]:active,\nfieldset[disabled] .btn-default:active,\n.btn-default.disabled.active,\n.btn-default[disabled].active,\nfieldset[disabled] .btn-default.active {\n  background-color: #e0e0e0;\n  background-image: none;\n}\n.btn-primary {\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);\n  background-image:      -o-linear-gradient(top, #337ab7 0%, #265a88 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));\n  background-image:         linear-gradient(to bottom, #337ab7 0%, #265a88 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #245580;\n}\n.btn-primary:hover,\n.btn-primary:focus {\n  background-color: #265a88;\n  background-position: 0 -15px;\n}\n.btn-primary:active,\n.btn-primary.active {\n  background-color: #265a88;\n  border-color: #245580;\n}\n.btn-primary.disabled,\n.btn-primary[disabled],\nfieldset[disabled] .btn-primary,\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus,\n.btn-primary.disabled:active,\n.btn-primary[disabled]:active,\nfieldset[disabled] .btn-primary:active,\n.btn-primary.disabled.active,\n.btn-primary[disabled].active,\nfieldset[disabled] .btn-primary.active {\n  background-color: #265a88;\n  background-image: none;\n}\n.btn-success {\n  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n  background-image:      -o-linear-gradient(top, #5cb85c 0%, #419641 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));\n  background-image:         linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #3e8f3e;\n}\n.btn-success:hover,\n.btn-success:focus {\n  background-color: #419641;\n  background-position: 0 -15px;\n}\n.btn-success:active,\n.btn-success.active {\n  background-color: #419641;\n  border-color: #3e8f3e;\n}\n.btn-success.disabled,\n.btn-success[disabled],\nfieldset[disabled] .btn-success,\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus,\n.btn-success.disabled:active,\n.btn-success[disabled]:active,\nfieldset[disabled] .btn-success:active,\n.btn-success.disabled.active,\n.btn-success[disabled].active,\nfieldset[disabled] .btn-success.active {\n  background-color: #419641;\n  background-image: none;\n}\n.btn-info {\n  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n  background-image:      -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));\n  background-image:         linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #28a4c9;\n}\n.btn-info:hover,\n.btn-info:focus {\n  background-color: #2aabd2;\n  background-position: 0 -15px;\n}\n.btn-info:active,\n.btn-info.active {\n  background-color: #2aabd2;\n  border-color: #28a4c9;\n}\n.btn-info.disabled,\n.btn-info[disabled],\nfieldset[disabled] .btn-info,\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus,\n.btn-info.disabled:active,\n.btn-info[disabled]:active,\nfieldset[disabled] .btn-info:active,\n.btn-info.disabled.active,\n.btn-info[disabled].active,\nfieldset[disabled] .btn-info.active {\n  background-color: #2aabd2;\n  background-image: none;\n}\n.btn-warning {\n  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n  background-image:      -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));\n  background-image:         linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #e38d13;\n}\n.btn-warning:hover,\n.btn-warning:focus {\n  background-color: #eb9316;\n  background-position: 0 -15px;\n}\n.btn-warning:active,\n.btn-warning.active {\n  background-color: #eb9316;\n  border-color: #e38d13;\n}\n.btn-warning.disabled,\n.btn-warning[disabled],\nfieldset[disabled] .btn-warning,\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus,\n.btn-warning.disabled:active,\n.btn-warning[disabled]:active,\nfieldset[disabled] .btn-warning:active,\n.btn-warning.disabled.active,\n.btn-warning[disabled].active,\nfieldset[disabled] .btn-warning.active {\n  background-color: #eb9316;\n  background-image: none;\n}\n.btn-danger {\n  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n  background-image:      -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));\n  background-image:         linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #b92c28;\n}\n.btn-danger:hover,\n.btn-danger:focus {\n  background-color: #c12e2a;\n  background-position: 0 -15px;\n}\n.btn-danger:active,\n.btn-danger.active {\n  background-color: #c12e2a;\n  border-color: #b92c28;\n}\n.btn-danger.disabled,\n.btn-danger[disabled],\nfieldset[disabled] .btn-danger,\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus,\n.btn-danger.disabled:active,\n.btn-danger[disabled]:active,\nfieldset[disabled] .btn-danger:active,\n.btn-danger.disabled.active,\n.btn-danger[disabled].active,\nfieldset[disabled] .btn-danger.active {\n  background-color: #c12e2a;\n  background-image: none;\n}\n.thumbnail,\n.img-thumbnail {\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);\n          box-shadow: 0 1px 2px rgba(0, 0, 0, .075);\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  background-color: #e8e8e8;\n  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image:      -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));\n  background-image:         linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n  background-repeat: repeat-x;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  background-color: #2e6da4;\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));\n  background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n  background-repeat: repeat-x;\n}\n.navbar-default {\n  background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);\n  background-image:      -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));\n  background-image:         linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .active > a {\n  background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n  background-image:      -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));\n  background-image:         linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);\n  background-repeat: repeat-x;\n  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);\n}\n.navbar-brand,\n.navbar-nav > li > a {\n  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);\n}\n.navbar-inverse {\n  background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);\n  background-image:      -o-linear-gradient(top, #3c3c3c 0%, #222 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));\n  background-image:         linear-gradient(to bottom, #3c3c3c 0%, #222 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-radius: 4px;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .active > a {\n  background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n  background-image:      -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));\n  background-image:         linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);\n  background-repeat: repeat-x;\n  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);\n          box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);\n}\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);\n}\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  border-radius: 0;\n}\n@media (max-width: 767px) {\n  .navbar .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #fff;\n    background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n    background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n    background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));\n    background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n    background-repeat: repeat-x;\n  }\n}\n.alert {\n  text-shadow: 0 1px 0 rgba(255, 255, 255, .2);\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);\n}\n.alert-success {\n  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n  background-image:      -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));\n  background-image:         linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n  background-repeat: repeat-x;\n  border-color: #b2dba1;\n}\n.alert-info {\n  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n  background-image:      -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));\n  background-image:         linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n  background-repeat: repeat-x;\n  border-color: #9acfea;\n}\n.alert-warning {\n  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n  background-image:      -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));\n  background-image:         linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n  background-repeat: repeat-x;\n  border-color: #f5e79e;\n}\n.alert-danger {\n  background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n  background-image:      -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));\n  background-image:         linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n  background-repeat: repeat-x;\n  border-color: #dca7a7;\n}\n.progress {\n  background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n  background-image:      -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));\n  background-image:         linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n  background-repeat: repeat-x;\n}\n.progress-bar {\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);\n  background-image:      -o-linear-gradient(top, #337ab7 0%, #286090 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));\n  background-image:         linear-gradient(to bottom, #337ab7 0%, #286090 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);\n  background-repeat: repeat-x;\n}\n.progress-bar-success {\n  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n  background-image:      -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));\n  background-image:         linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n  background-repeat: repeat-x;\n}\n.progress-bar-info {\n  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n  background-image:      -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));\n  background-image:         linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n  background-repeat: repeat-x;\n}\n.progress-bar-warning {\n  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n  background-image:      -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));\n  background-image:         linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n  background-repeat: repeat-x;\n}\n.progress-bar-danger {\n  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n  background-image:      -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));\n  background-image:         linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n  background-repeat: repeat-x;\n}\n.progress-bar-striped {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.list-group {\n  border-radius: 4px;\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);\n          box-shadow: 0 1px 2px rgba(0, 0, 0, .075);\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  text-shadow: 0 -1px 0 #286090;\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n  background-image:      -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));\n  background-image:         linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);\n  background-repeat: repeat-x;\n  border-color: #2b669a;\n}\n.list-group-item.active .badge,\n.list-group-item.active:hover .badge,\n.list-group-item.active:focus .badge {\n  text-shadow: none;\n}\n.panel {\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);\n          box-shadow: 0 1px 2px rgba(0, 0, 0, .05);\n}\n.panel-default > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image:      -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));\n  background-image:         linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n  background-repeat: repeat-x;\n}\n.panel-primary > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));\n  background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n  background-repeat: repeat-x;\n}\n.panel-success > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n  background-image:      -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));\n  background-image:         linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n  background-repeat: repeat-x;\n}\n.panel-info > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n  background-image:      -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));\n  background-image:         linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n  background-repeat: repeat-x;\n}\n.panel-warning > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n  background-image:      -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));\n  background-image:         linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n  background-repeat: repeat-x;\n}\n.panel-danger > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n  background-image:      -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));\n  background-image:         linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n  background-repeat: repeat-x;\n}\n.well {\n  background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n  background-image:      -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n  background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));\n  background-image:         linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n  background-repeat: repeat-x;\n  border-color: #dcdcdc;\n  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);\n          box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);\n}\n/*# sourceMappingURL=bootstrap-theme.css.map */\n"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/bootstrap/dist/css/bootstrap.css",
    "content": "/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n  font-family: sans-serif;\n  -webkit-text-size-adjust: 100%;\n      -ms-text-size-adjust: 100%;\n}\nbody {\n  margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n  display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n  display: inline-block;\n  vertical-align: baseline;\n}\naudio:not([controls]) {\n  display: none;\n  height: 0;\n}\n[hidden],\ntemplate {\n  display: none;\n}\na {\n  background-color: transparent;\n}\na:active,\na:hover {\n  outline: 0;\n}\nabbr[title] {\n  border-bottom: 1px dotted;\n}\nb,\nstrong {\n  font-weight: bold;\n}\ndfn {\n  font-style: italic;\n}\nh1 {\n  margin: .67em 0;\n  font-size: 2em;\n}\nmark {\n  color: #000;\n  background: #ff0;\n}\nsmall {\n  font-size: 80%;\n}\nsub,\nsup {\n  position: relative;\n  font-size: 75%;\n  line-height: 0;\n  vertical-align: baseline;\n}\nsup {\n  top: -.5em;\n}\nsub {\n  bottom: -.25em;\n}\nimg {\n  border: 0;\n}\nsvg:not(:root) {\n  overflow: hidden;\n}\nfigure {\n  margin: 1em 40px;\n}\nhr {\n  height: 0;\n  -webkit-box-sizing: content-box;\n     -moz-box-sizing: content-box;\n          box-sizing: content-box;\n}\npre {\n  overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  margin: 0;\n  font: inherit;\n  color: inherit;\n}\nbutton {\n  overflow: visible;\n}\nbutton,\nselect {\n  text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  -webkit-appearance: button;\n  cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  padding: 0;\n  border: 0;\n}\ninput {\n  line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n  padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\ninput[type=\"search\"] {\n  -webkit-box-sizing: content-box;\n     -moz-box-sizing: content-box;\n          box-sizing: content-box;\n  -webkit-appearance: textfield;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\nfieldset {\n  padding: .35em .625em .75em;\n  margin: 0 2px;\n  border: 1px solid #c0c0c0;\n}\nlegend {\n  padding: 0;\n  border: 0;\n}\ntextarea {\n  overflow: auto;\n}\noptgroup {\n  font-weight: bold;\n}\ntable {\n  border-spacing: 0;\n  border-collapse: collapse;\n}\ntd,\nth {\n  padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n  *,\n  *:before,\n  *:after {\n    color: #000 !important;\n    text-shadow: none !important;\n    background: transparent !important;\n    -webkit-box-shadow: none !important;\n            box-shadow: none !important;\n  }\n  a,\n  a:visited {\n    text-decoration: underline;\n  }\n  a[href]:after {\n    content: \" (\" attr(href) \")\";\n  }\n  abbr[title]:after {\n    content: \" (\" attr(title) \")\";\n  }\n  a[href^=\"#\"]:after,\n  a[href^=\"javascript:\"]:after {\n    content: \"\";\n  }\n  pre,\n  blockquote {\n    border: 1px solid #999;\n\n    page-break-inside: avoid;\n  }\n  thead {\n    display: table-header-group;\n  }\n  tr,\n  img {\n    page-break-inside: avoid;\n  }\n  img {\n    max-width: 100% !important;\n  }\n  p,\n  h2,\n  h3 {\n    orphans: 3;\n    widows: 3;\n  }\n  h2,\n  h3 {\n    page-break-after: avoid;\n  }\n  .navbar {\n    display: none;\n  }\n  .btn > .caret,\n  .dropup > .btn > .caret {\n    border-top-color: #000 !important;\n  }\n  .label {\n    border: 1px solid #000;\n  }\n  .table {\n    border-collapse: collapse !important;\n  }\n  .table td,\n  .table th {\n    background-color: #fff !important;\n  }\n  .table-bordered th,\n  .table-bordered td {\n    border: 1px solid #ddd !important;\n  }\n}\n@font-face {\n  font-family: 'Glyphicons Halflings';\n\n  src: url('../fonts/glyphicons-halflings-regular.eot');\n  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n  position: relative;\n  top: 1px;\n  display: inline-block;\n  font-family: 'Glyphicons Halflings';\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1;\n\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n  content: \"\\002a\";\n}\n.glyphicon-plus:before {\n  content: \"\\002b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n  content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n  content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n  content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n  content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n  content: \"\\270f\";\n}\n.glyphicon-glass:before {\n  content: \"\\e001\";\n}\n.glyphicon-music:before {\n  content: \"\\e002\";\n}\n.glyphicon-search:before {\n  content: \"\\e003\";\n}\n.glyphicon-heart:before {\n  content: \"\\e005\";\n}\n.glyphicon-star:before {\n  content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n  content: \"\\e007\";\n}\n.glyphicon-user:before {\n  content: \"\\e008\";\n}\n.glyphicon-film:before {\n  content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n  content: \"\\e010\";\n}\n.glyphicon-th:before {\n  content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n  content: \"\\e012\";\n}\n.glyphicon-ok:before {\n  content: \"\\e013\";\n}\n.glyphicon-remove:before {\n  content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n  content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n  content: \"\\e016\";\n}\n.glyphicon-off:before {\n  content: \"\\e017\";\n}\n.glyphicon-signal:before {\n  content: \"\\e018\";\n}\n.glyphicon-cog:before {\n  content: \"\\e019\";\n}\n.glyphicon-trash:before {\n  content: \"\\e020\";\n}\n.glyphicon-home:before {\n  content: \"\\e021\";\n}\n.glyphicon-file:before {\n  content: \"\\e022\";\n}\n.glyphicon-time:before {\n  content: \"\\e023\";\n}\n.glyphicon-road:before {\n  content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n  content: \"\\e025\";\n}\n.glyphicon-download:before {\n  content: \"\\e026\";\n}\n.glyphicon-upload:before {\n  content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n  content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n  content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n  content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n  content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n  content: \"\\e032\";\n}\n.glyphicon-lock:before {\n  content: \"\\e033\";\n}\n.glyphicon-flag:before {\n  content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n  content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n  content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n  content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n  content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n  content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n  content: \"\\e040\";\n}\n.glyphicon-tag:before {\n  content: \"\\e041\";\n}\n.glyphicon-tags:before {\n  content: \"\\e042\";\n}\n.glyphicon-book:before {\n  content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n  content: \"\\e044\";\n}\n.glyphicon-print:before {\n  content: \"\\e045\";\n}\n.glyphicon-camera:before {\n  content: \"\\e046\";\n}\n.glyphicon-font:before {\n  content: \"\\e047\";\n}\n.glyphicon-bold:before {\n  content: \"\\e048\";\n}\n.glyphicon-italic:before {\n  content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n  content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n  content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n  content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n  content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n  content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n  content: \"\\e055\";\n}\n.glyphicon-list:before {\n  content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n  content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n  content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n  content: \"\\e059\";\n}\n.glyphicon-picture:before {\n  content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n  content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n  content: \"\\e063\";\n}\n.glyphicon-tint:before {\n  content: \"\\e064\";\n}\n.glyphicon-edit:before {\n  content: \"\\e065\";\n}\n.glyphicon-share:before {\n  content: \"\\e066\";\n}\n.glyphicon-check:before {\n  content: \"\\e067\";\n}\n.glyphicon-move:before {\n  content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n  content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n  content: \"\\e070\";\n}\n.glyphicon-backward:before {\n  content: \"\\e071\";\n}\n.glyphicon-play:before {\n  content: \"\\e072\";\n}\n.glyphicon-pause:before {\n  content: \"\\e073\";\n}\n.glyphicon-stop:before {\n  content: \"\\e074\";\n}\n.glyphicon-forward:before {\n  content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n  content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n  content: \"\\e077\";\n}\n.glyphicon-eject:before {\n  content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n  content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n  content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n  content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n  content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n  content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n  content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n  content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n  content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n  content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n  content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n  content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n  content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n  content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n  content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n  content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n  content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n  content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n  content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n  content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n  content: \"\\e101\";\n}\n.glyphicon-gift:before {\n  content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n  content: \"\\e103\";\n}\n.glyphicon-fire:before {\n  content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n  content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n  content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n  content: \"\\e107\";\n}\n.glyphicon-plane:before {\n  content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n  content: \"\\e109\";\n}\n.glyphicon-random:before {\n  content: \"\\e110\";\n}\n.glyphicon-comment:before {\n  content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n  content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n  content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n  content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n  content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n  content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n  content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n  content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n  content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n  content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n  content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n  content: \"\\e122\";\n}\n.glyphicon-bell:before {\n  content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n  content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n  content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n  content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n  content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n  content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n  content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n  content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n  content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n  content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n  content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n  content: \"\\e134\";\n}\n.glyphicon-globe:before {\n  content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n  content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n  content: \"\\e137\";\n}\n.glyphicon-filter:before {\n  content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n  content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n  content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n  content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n  content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n  content: \"\\e143\";\n}\n.glyphicon-link:before {\n  content: \"\\e144\";\n}\n.glyphicon-phone:before {\n  content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n  content: \"\\e146\";\n}\n.glyphicon-usd:before {\n  content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n  content: \"\\e149\";\n}\n.glyphicon-sort:before {\n  content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n  content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n  content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n  content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n  content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n  content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n  content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n  content: \"\\e157\";\n}\n.glyphicon-expand:before {\n  content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n  content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n  content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n  content: \"\\e161\";\n}\n.glyphicon-flash:before {\n  content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n  content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n  content: \"\\e164\";\n}\n.glyphicon-record:before {\n  content: \"\\e165\";\n}\n.glyphicon-save:before {\n  content: \"\\e166\";\n}\n.glyphicon-open:before {\n  content: \"\\e167\";\n}\n.glyphicon-saved:before {\n  content: \"\\e168\";\n}\n.glyphicon-import:before {\n  content: \"\\e169\";\n}\n.glyphicon-export:before {\n  content: \"\\e170\";\n}\n.glyphicon-send:before {\n  content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n  content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n  content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n  content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n  content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n  content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n  content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n  content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n  content: \"\\e179\";\n}\n.glyphicon-header:before {\n  content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n  content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n  content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n  content: \"\\e183\";\n}\n.glyphicon-tower:before {\n  content: \"\\e184\";\n}\n.glyphicon-stats:before {\n  content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n  content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n  content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n  content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n  content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n  content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n  content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n  content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n  content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n  content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n  content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n  content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n  content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n  content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n  content: \"\\e200\";\n}\n.glyphicon-cd:before {\n  content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n  content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n  content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n  content: \"\\e204\";\n}\n.glyphicon-copy:before {\n  content: \"\\e205\";\n}\n.glyphicon-paste:before {\n  content: \"\\e206\";\n}\n.glyphicon-alert:before {\n  content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n  content: \"\\e210\";\n}\n.glyphicon-king:before {\n  content: \"\\e211\";\n}\n.glyphicon-queen:before {\n  content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n  content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n  content: \"\\e214\";\n}\n.glyphicon-knight:before {\n  content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n  content: \"\\e216\";\n}\n.glyphicon-tent:before {\n  content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n  content: \"\\e218\";\n}\n.glyphicon-bed:before {\n  content: \"\\e219\";\n}\n.glyphicon-apple:before {\n  content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n  content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n  content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n  content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n  content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n  content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n  content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n  content: \"\\e227\";\n}\n.glyphicon-btc:before {\n  content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n  content: \"\\e227\";\n}\n.glyphicon-yen:before {\n  content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n  content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n  content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n  content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n  content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n  content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n  content: \"\\e232\";\n}\n.glyphicon-education:before {\n  content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n  content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n  content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n  content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n  content: \"\\e237\";\n}\n.glyphicon-oil:before {\n  content: \"\\e238\";\n}\n.glyphicon-grain:before {\n  content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n  content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n  content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n  content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n  content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n  content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n  content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n  content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n  content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n  content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n  content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n  content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n  content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n  content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n  content: \"\\e253\";\n}\n.glyphicon-console:before {\n  content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n  content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n  content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n  content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n  content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n  content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n  content: \"\\e260\";\n}\n* {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\n*:before,\n*:after {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\nhtml {\n  font-size: 10px;\n\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #333;\n  background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: inherit;\n  font-size: inherit;\n  line-height: inherit;\n}\na {\n  color: #337ab7;\n  text-decoration: none;\n}\na:hover,\na:focus {\n  color: #23527c;\n  text-decoration: underline;\n}\na:focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\nfigure {\n  margin: 0;\n}\nimg {\n  vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  display: block;\n  max-width: 100%;\n  height: auto;\n}\n.img-rounded {\n  border-radius: 6px;\n}\n.img-thumbnail {\n  display: inline-block;\n  max-width: 100%;\n  height: auto;\n  padding: 4px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 4px;\n  -webkit-transition: all .2s ease-in-out;\n       -o-transition: all .2s ease-in-out;\n          transition: all .2s ease-in-out;\n}\n.img-circle {\n  border-radius: 50%;\n}\nhr {\n  margin-top: 20px;\n  margin-bottom: 20px;\n  border: 0;\n  border-top: 1px solid #eee;\n}\n.sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  padding: 0;\n  margin: -1px;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n  position: static;\n  width: auto;\n  height: auto;\n  margin: 0;\n  overflow: visible;\n  clip: auto;\n}\n[role=\"button\"] {\n  cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n  font-family: inherit;\n  font-weight: 500;\n  line-height: 1.1;\n  color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n  font-weight: normal;\n  line-height: 1;\n  color: #777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n  margin-top: 20px;\n  margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n  font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n  font-size: 75%;\n}\nh1,\n.h1 {\n  font-size: 36px;\n}\nh2,\n.h2 {\n  font-size: 30px;\n}\nh3,\n.h3 {\n  font-size: 24px;\n}\nh4,\n.h4 {\n  font-size: 18px;\n}\nh5,\n.h5 {\n  font-size: 14px;\n}\nh6,\n.h6 {\n  font-size: 12px;\n}\np {\n  margin: 0 0 10px;\n}\n.lead {\n  margin-bottom: 20px;\n  font-size: 16px;\n  font-weight: 300;\n  line-height: 1.4;\n}\n@media (min-width: 768px) {\n  .lead {\n    font-size: 21px;\n  }\n}\nsmall,\n.small {\n  font-size: 85%;\n}\nmark,\n.mark {\n  padding: .2em;\n  background-color: #fcf8e3;\n}\n.text-left {\n  text-align: left;\n}\n.text-right {\n  text-align: right;\n}\n.text-center {\n  text-align: center;\n}\n.text-justify {\n  text-align: justify;\n}\n.text-nowrap {\n  white-space: nowrap;\n}\n.text-lowercase {\n  text-transform: lowercase;\n}\n.text-uppercase {\n  text-transform: uppercase;\n}\n.text-capitalize {\n  text-transform: capitalize;\n}\n.text-muted {\n  color: #777;\n}\n.text-primary {\n  color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n  color: #286090;\n}\n.text-success {\n  color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n  color: #2b542c;\n}\n.text-info {\n  color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n  color: #245269;\n}\n.text-warning {\n  color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n  color: #66512c;\n}\n.text-danger {\n  color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n  color: #843534;\n}\n.bg-primary {\n  color: #fff;\n  background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n  background-color: #286090;\n}\n.bg-success {\n  background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n  background-color: #c1e2b3;\n}\n.bg-info {\n  background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n  background-color: #afd9ee;\n}\n.bg-warning {\n  background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n  background-color: #f7ecb5;\n}\n.bg-danger {\n  background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n  background-color: #e4b9b9;\n}\n.page-header {\n  padding-bottom: 9px;\n  margin: 40px 0 20px;\n  border-bottom: 1px solid #eee;\n}\nul,\nol {\n  margin-top: 0;\n  margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n  margin-bottom: 0;\n}\n.list-unstyled {\n  padding-left: 0;\n  list-style: none;\n}\n.list-inline {\n  padding-left: 0;\n  margin-left: -5px;\n  list-style: none;\n}\n.list-inline > li {\n  display: inline-block;\n  padding-right: 5px;\n  padding-left: 5px;\n}\ndl {\n  margin-top: 0;\n  margin-bottom: 20px;\n}\ndt,\ndd {\n  line-height: 1.42857143;\n}\ndt {\n  font-weight: bold;\n}\ndd {\n  margin-left: 0;\n}\n@media (min-width: 768px) {\n  .dl-horizontal dt {\n    float: left;\n    width: 160px;\n    overflow: hidden;\n    clear: left;\n    text-align: right;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n  }\n  .dl-horizontal dd {\n    margin-left: 180px;\n  }\n}\nabbr[title],\nabbr[data-original-title] {\n  cursor: help;\n  border-bottom: 1px dotted #777;\n}\n.initialism {\n  font-size: 90%;\n  text-transform: uppercase;\n}\nblockquote {\n  padding: 10px 20px;\n  margin: 0 0 20px;\n  font-size: 17.5px;\n  border-left: 5px solid #eee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n  margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n  display: block;\n  font-size: 80%;\n  line-height: 1.42857143;\n  color: #777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n  content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n  padding-right: 15px;\n  padding-left: 0;\n  text-align: right;\n  border-right: 5px solid #eee;\n  border-left: 0;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n  content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n  content: '\\00A0 \\2014';\n}\naddress {\n  margin-bottom: 20px;\n  font-style: normal;\n  line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n  font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #c7254e;\n  background-color: #f9f2f4;\n  border-radius: 4px;\n}\nkbd {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #fff;\n  background-color: #333;\n  border-radius: 3px;\n  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);\n          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);\n}\nkbd kbd {\n  padding: 0;\n  font-size: 100%;\n  font-weight: bold;\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\npre {\n  display: block;\n  padding: 9.5px;\n  margin: 0 0 10px;\n  font-size: 13px;\n  line-height: 1.42857143;\n  color: #333;\n  word-break: break-all;\n  word-wrap: break-word;\n  background-color: #f5f5f5;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n}\npre code {\n  padding: 0;\n  font-size: inherit;\n  color: inherit;\n  white-space: pre-wrap;\n  background-color: transparent;\n  border-radius: 0;\n}\n.pre-scrollable {\n  max-height: 340px;\n  overflow-y: scroll;\n}\n.container {\n  padding-right: 15px;\n  padding-left: 15px;\n  margin-right: auto;\n  margin-left: auto;\n}\n@media (min-width: 768px) {\n  .container {\n    width: 750px;\n  }\n}\n@media (min-width: 992px) {\n  .container {\n    width: 970px;\n  }\n}\n@media (min-width: 1200px) {\n  .container {\n    width: 1170px;\n  }\n}\n.container-fluid {\n  padding-right: 15px;\n  padding-left: 15px;\n  margin-right: auto;\n  margin-left: auto;\n}\n.row {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n  position: relative;\n  min-height: 1px;\n  padding-right: 15px;\n  padding-left: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n  float: left;\n}\n.col-xs-12 {\n  width: 100%;\n}\n.col-xs-11 {\n  width: 91.66666667%;\n}\n.col-xs-10 {\n  width: 83.33333333%;\n}\n.col-xs-9 {\n  width: 75%;\n}\n.col-xs-8 {\n  width: 66.66666667%;\n}\n.col-xs-7 {\n  width: 58.33333333%;\n}\n.col-xs-6 {\n  width: 50%;\n}\n.col-xs-5 {\n  width: 41.66666667%;\n}\n.col-xs-4 {\n  width: 33.33333333%;\n}\n.col-xs-3 {\n  width: 25%;\n}\n.col-xs-2 {\n  width: 16.66666667%;\n}\n.col-xs-1 {\n  width: 8.33333333%;\n}\n.col-xs-pull-12 {\n  right: 100%;\n}\n.col-xs-pull-11 {\n  right: 91.66666667%;\n}\n.col-xs-pull-10 {\n  right: 83.33333333%;\n}\n.col-xs-pull-9 {\n  right: 75%;\n}\n.col-xs-pull-8 {\n  right: 66.66666667%;\n}\n.col-xs-pull-7 {\n  right: 58.33333333%;\n}\n.col-xs-pull-6 {\n  right: 50%;\n}\n.col-xs-pull-5 {\n  right: 41.66666667%;\n}\n.col-xs-pull-4 {\n  right: 33.33333333%;\n}\n.col-xs-pull-3 {\n  right: 25%;\n}\n.col-xs-pull-2 {\n  right: 16.66666667%;\n}\n.col-xs-pull-1 {\n  right: 8.33333333%;\n}\n.col-xs-pull-0 {\n  right: auto;\n}\n.col-xs-push-12 {\n  left: 100%;\n}\n.col-xs-push-11 {\n  left: 91.66666667%;\n}\n.col-xs-push-10 {\n  left: 83.33333333%;\n}\n.col-xs-push-9 {\n  left: 75%;\n}\n.col-xs-push-8 {\n  left: 66.66666667%;\n}\n.col-xs-push-7 {\n  left: 58.33333333%;\n}\n.col-xs-push-6 {\n  left: 50%;\n}\n.col-xs-push-5 {\n  left: 41.66666667%;\n}\n.col-xs-push-4 {\n  left: 33.33333333%;\n}\n.col-xs-push-3 {\n  left: 25%;\n}\n.col-xs-push-2 {\n  left: 16.66666667%;\n}\n.col-xs-push-1 {\n  left: 8.33333333%;\n}\n.col-xs-push-0 {\n  left: auto;\n}\n.col-xs-offset-12 {\n  margin-left: 100%;\n}\n.col-xs-offset-11 {\n  margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n  margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n  margin-left: 75%;\n}\n.col-xs-offset-8 {\n  margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n  margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n  margin-left: 50%;\n}\n.col-xs-offset-5 {\n  margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n  margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n  margin-left: 25%;\n}\n.col-xs-offset-2 {\n  margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n  margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n  margin-left: 0;\n}\n@media (min-width: 768px) {\n  .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n    float: left;\n  }\n  .col-sm-12 {\n    width: 100%;\n  }\n  .col-sm-11 {\n    width: 91.66666667%;\n  }\n  .col-sm-10 {\n    width: 83.33333333%;\n  }\n  .col-sm-9 {\n    width: 75%;\n  }\n  .col-sm-8 {\n    width: 66.66666667%;\n  }\n  .col-sm-7 {\n    width: 58.33333333%;\n  }\n  .col-sm-6 {\n    width: 50%;\n  }\n  .col-sm-5 {\n    width: 41.66666667%;\n  }\n  .col-sm-4 {\n    width: 33.33333333%;\n  }\n  .col-sm-3 {\n    width: 25%;\n  }\n  .col-sm-2 {\n    width: 16.66666667%;\n  }\n  .col-sm-1 {\n    width: 8.33333333%;\n  }\n  .col-sm-pull-12 {\n    right: 100%;\n  }\n  .col-sm-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-sm-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-sm-pull-9 {\n    right: 75%;\n  }\n  .col-sm-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-sm-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-sm-pull-6 {\n    right: 50%;\n  }\n  .col-sm-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-sm-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-sm-pull-3 {\n    right: 25%;\n  }\n  .col-sm-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-sm-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-sm-pull-0 {\n    right: auto;\n  }\n  .col-sm-push-12 {\n    left: 100%;\n  }\n  .col-sm-push-11 {\n    left: 91.66666667%;\n  }\n  .col-sm-push-10 {\n    left: 83.33333333%;\n  }\n  .col-sm-push-9 {\n    left: 75%;\n  }\n  .col-sm-push-8 {\n    left: 66.66666667%;\n  }\n  .col-sm-push-7 {\n    left: 58.33333333%;\n  }\n  .col-sm-push-6 {\n    left: 50%;\n  }\n  .col-sm-push-5 {\n    left: 41.66666667%;\n  }\n  .col-sm-push-4 {\n    left: 33.33333333%;\n  }\n  .col-sm-push-3 {\n    left: 25%;\n  }\n  .col-sm-push-2 {\n    left: 16.66666667%;\n  }\n  .col-sm-push-1 {\n    left: 8.33333333%;\n  }\n  .col-sm-push-0 {\n    left: auto;\n  }\n  .col-sm-offset-12 {\n    margin-left: 100%;\n  }\n  .col-sm-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-sm-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-sm-offset-9 {\n    margin-left: 75%;\n  }\n  .col-sm-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-sm-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-sm-offset-6 {\n    margin-left: 50%;\n  }\n  .col-sm-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-sm-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-sm-offset-3 {\n    margin-left: 25%;\n  }\n  .col-sm-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-sm-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-sm-offset-0 {\n    margin-left: 0;\n  }\n}\n@media (min-width: 992px) {\n  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n    float: left;\n  }\n  .col-md-12 {\n    width: 100%;\n  }\n  .col-md-11 {\n    width: 91.66666667%;\n  }\n  .col-md-10 {\n    width: 83.33333333%;\n  }\n  .col-md-9 {\n    width: 75%;\n  }\n  .col-md-8 {\n    width: 66.66666667%;\n  }\n  .col-md-7 {\n    width: 58.33333333%;\n  }\n  .col-md-6 {\n    width: 50%;\n  }\n  .col-md-5 {\n    width: 41.66666667%;\n  }\n  .col-md-4 {\n    width: 33.33333333%;\n  }\n  .col-md-3 {\n    width: 25%;\n  }\n  .col-md-2 {\n    width: 16.66666667%;\n  }\n  .col-md-1 {\n    width: 8.33333333%;\n  }\n  .col-md-pull-12 {\n    right: 100%;\n  }\n  .col-md-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-md-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-md-pull-9 {\n    right: 75%;\n  }\n  .col-md-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-md-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-md-pull-6 {\n    right: 50%;\n  }\n  .col-md-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-md-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-md-pull-3 {\n    right: 25%;\n  }\n  .col-md-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-md-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-md-pull-0 {\n    right: auto;\n  }\n  .col-md-push-12 {\n    left: 100%;\n  }\n  .col-md-push-11 {\n    left: 91.66666667%;\n  }\n  .col-md-push-10 {\n    left: 83.33333333%;\n  }\n  .col-md-push-9 {\n    left: 75%;\n  }\n  .col-md-push-8 {\n    left: 66.66666667%;\n  }\n  .col-md-push-7 {\n    left: 58.33333333%;\n  }\n  .col-md-push-6 {\n    left: 50%;\n  }\n  .col-md-push-5 {\n    left: 41.66666667%;\n  }\n  .col-md-push-4 {\n    left: 33.33333333%;\n  }\n  .col-md-push-3 {\n    left: 25%;\n  }\n  .col-md-push-2 {\n    left: 16.66666667%;\n  }\n  .col-md-push-1 {\n    left: 8.33333333%;\n  }\n  .col-md-push-0 {\n    left: auto;\n  }\n  .col-md-offset-12 {\n    margin-left: 100%;\n  }\n  .col-md-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-md-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-md-offset-9 {\n    margin-left: 75%;\n  }\n  .col-md-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-md-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-md-offset-6 {\n    margin-left: 50%;\n  }\n  .col-md-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-md-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-md-offset-3 {\n    margin-left: 25%;\n  }\n  .col-md-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-md-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-md-offset-0 {\n    margin-left: 0;\n  }\n}\n@media (min-width: 1200px) {\n  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n    float: left;\n  }\n  .col-lg-12 {\n    width: 100%;\n  }\n  .col-lg-11 {\n    width: 91.66666667%;\n  }\n  .col-lg-10 {\n    width: 83.33333333%;\n  }\n  .col-lg-9 {\n    width: 75%;\n  }\n  .col-lg-8 {\n    width: 66.66666667%;\n  }\n  .col-lg-7 {\n    width: 58.33333333%;\n  }\n  .col-lg-6 {\n    width: 50%;\n  }\n  .col-lg-5 {\n    width: 41.66666667%;\n  }\n  .col-lg-4 {\n    width: 33.33333333%;\n  }\n  .col-lg-3 {\n    width: 25%;\n  }\n  .col-lg-2 {\n    width: 16.66666667%;\n  }\n  .col-lg-1 {\n    width: 8.33333333%;\n  }\n  .col-lg-pull-12 {\n    right: 100%;\n  }\n  .col-lg-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-lg-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-lg-pull-9 {\n    right: 75%;\n  }\n  .col-lg-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-lg-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-lg-pull-6 {\n    right: 50%;\n  }\n  .col-lg-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-lg-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-lg-pull-3 {\n    right: 25%;\n  }\n  .col-lg-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-lg-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-lg-pull-0 {\n    right: auto;\n  }\n  .col-lg-push-12 {\n    left: 100%;\n  }\n  .col-lg-push-11 {\n    left: 91.66666667%;\n  }\n  .col-lg-push-10 {\n    left: 83.33333333%;\n  }\n  .col-lg-push-9 {\n    left: 75%;\n  }\n  .col-lg-push-8 {\n    left: 66.66666667%;\n  }\n  .col-lg-push-7 {\n    left: 58.33333333%;\n  }\n  .col-lg-push-6 {\n    left: 50%;\n  }\n  .col-lg-push-5 {\n    left: 41.66666667%;\n  }\n  .col-lg-push-4 {\n    left: 33.33333333%;\n  }\n  .col-lg-push-3 {\n    left: 25%;\n  }\n  .col-lg-push-2 {\n    left: 16.66666667%;\n  }\n  .col-lg-push-1 {\n    left: 8.33333333%;\n  }\n  .col-lg-push-0 {\n    left: auto;\n  }\n  .col-lg-offset-12 {\n    margin-left: 100%;\n  }\n  .col-lg-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-lg-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-lg-offset-9 {\n    margin-left: 75%;\n  }\n  .col-lg-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-lg-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-lg-offset-6 {\n    margin-left: 50%;\n  }\n  .col-lg-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-lg-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-lg-offset-3 {\n    margin-left: 25%;\n  }\n  .col-lg-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-lg-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-lg-offset-0 {\n    margin-left: 0;\n  }\n}\ntable {\n  background-color: transparent;\n}\ncaption {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  color: #777;\n  text-align: left;\n}\nth {\n  text-align: left;\n}\n.table {\n  width: 100%;\n  max-width: 100%;\n  margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n  padding: 8px;\n  line-height: 1.42857143;\n  vertical-align: top;\n  border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n  vertical-align: bottom;\n  border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n  border-top: 0;\n}\n.table > tbody + tbody {\n  border-top: 2px solid #ddd;\n}\n.table .table {\n  background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n  padding: 5px;\n}\n.table-bordered {\n  border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n  border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n  border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n  background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n  background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n  position: static;\n  display: table-column;\n  float: none;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n  position: static;\n  display: table-cell;\n  float: none;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n  background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n  background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n  background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n  background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n  background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n  background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n  background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n  background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n  background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n  background-color: #ebcccc;\n}\n.table-responsive {\n  min-height: .01%;\n  overflow-x: auto;\n}\n@media screen and (max-width: 767px) {\n  .table-responsive {\n    width: 100%;\n    margin-bottom: 15px;\n    overflow-y: hidden;\n    -ms-overflow-style: -ms-autohiding-scrollbar;\n    border: 1px solid #ddd;\n  }\n  .table-responsive > .table {\n    margin-bottom: 0;\n  }\n  .table-responsive > .table > thead > tr > th,\n  .table-responsive > .table > tbody > tr > th,\n  .table-responsive > .table > tfoot > tr > th,\n  .table-responsive > .table > thead > tr > td,\n  .table-responsive > .table > tbody > tr > td,\n  .table-responsive > .table > tfoot > tr > td {\n    white-space: nowrap;\n  }\n  .table-responsive > .table-bordered {\n    border: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:first-child,\n  .table-responsive > .table-bordered > tbody > tr > th:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n  .table-responsive > .table-bordered > thead > tr > td:first-child,\n  .table-responsive > .table-bordered > tbody > tr > td:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n    border-left: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:last-child,\n  .table-responsive > .table-bordered > tbody > tr > th:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n  .table-responsive > .table-bordered > thead > tr > td:last-child,\n  .table-responsive > .table-bordered > tbody > tr > td:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n    border-right: 0;\n  }\n  .table-responsive > .table-bordered > tbody > tr:last-child > th,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n  .table-responsive > .table-bordered > tbody > tr:last-child > td,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n    border-bottom: 0;\n  }\n}\nfieldset {\n  min-width: 0;\n  padding: 0;\n  margin: 0;\n  border: 0;\n}\nlegend {\n  display: block;\n  width: 100%;\n  padding: 0;\n  margin-bottom: 20px;\n  font-size: 21px;\n  line-height: inherit;\n  color: #333;\n  border: 0;\n  border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n  display: inline-block;\n  max-width: 100%;\n  margin-bottom: 5px;\n  font-weight: bold;\n}\ninput[type=\"search\"] {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  margin: 4px 0 0;\n  margin-top: 1px \\9;\n  line-height: normal;\n}\ninput[type=\"file\"] {\n  display: block;\n}\ninput[type=\"range\"] {\n  display: block;\n  width: 100%;\n}\nselect[multiple],\nselect[size] {\n  height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\noutput {\n  display: block;\n  padding-top: 7px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #555;\n}\n.form-control {\n  display: block;\n  width: 100%;\n  height: 34px;\n  padding: 6px 12px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #555;\n  background-color: #fff;\n  background-image: none;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n  -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;\n       -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n          transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n  border-color: #66afe9;\n  outline: 0;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);\n          box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);\n}\n.form-control::-moz-placeholder {\n  color: #999;\n  opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n  color: #999;\n}\n.form-control::-webkit-input-placeholder {\n  color: #999;\n}\n.form-control::-ms-expand {\n  background-color: transparent;\n  border: 0;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n  background-color: #eee;\n  opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n  cursor: not-allowed;\n}\ntextarea.form-control {\n  height: auto;\n}\ninput[type=\"search\"] {\n  -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n  input[type=\"date\"].form-control,\n  input[type=\"time\"].form-control,\n  input[type=\"datetime-local\"].form-control,\n  input[type=\"month\"].form-control {\n    line-height: 34px;\n  }\n  input[type=\"date\"].input-sm,\n  input[type=\"time\"].input-sm,\n  input[type=\"datetime-local\"].input-sm,\n  input[type=\"month\"].input-sm,\n  .input-group-sm input[type=\"date\"],\n  .input-group-sm input[type=\"time\"],\n  .input-group-sm input[type=\"datetime-local\"],\n  .input-group-sm input[type=\"month\"] {\n    line-height: 30px;\n  }\n  input[type=\"date\"].input-lg,\n  input[type=\"time\"].input-lg,\n  input[type=\"datetime-local\"].input-lg,\n  input[type=\"month\"].input-lg,\n  .input-group-lg input[type=\"date\"],\n  .input-group-lg input[type=\"time\"],\n  .input-group-lg input[type=\"datetime-local\"],\n  .input-group-lg input[type=\"month\"] {\n    line-height: 46px;\n  }\n}\n.form-group {\n  margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n  position: relative;\n  display: block;\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n  min-height: 20px;\n  padding-left: 20px;\n  margin-bottom: 0;\n  font-weight: normal;\n  cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n  position: absolute;\n  margin-top: 4px \\9;\n  margin-left: -20px;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n  margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n  position: relative;\n  display: inline-block;\n  padding-left: 20px;\n  margin-bottom: 0;\n  font-weight: normal;\n  vertical-align: middle;\n  cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n  margin-top: 0;\n  margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n  cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n  cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n  cursor: not-allowed;\n}\n.form-control-static {\n  min-height: 34px;\n  padding-top: 7px;\n  padding-bottom: 7px;\n  margin-bottom: 0;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n  padding-right: 0;\n  padding-left: 0;\n}\n.input-sm {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.input-sm {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n  height: auto;\n}\n.form-group-sm .form-control {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.form-group-sm select.form-control {\n  height: 30px;\n  line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n  height: auto;\n}\n.form-group-sm .form-control-static {\n  height: 30px;\n  min-height: 32px;\n  padding: 6px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.input-lg {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.input-lg {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n  height: auto;\n}\n.form-group-lg .form-control {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\n.form-group-lg select.form-control {\n  height: 46px;\n  line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n  height: auto;\n}\n.form-group-lg .form-control-static {\n  height: 46px;\n  min-height: 38px;\n  padding: 11px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n}\n.has-feedback {\n  position: relative;\n}\n.has-feedback .form-control {\n  padding-right: 42.5px;\n}\n.form-control-feedback {\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 2;\n  display: block;\n  width: 34px;\n  height: 34px;\n  line-height: 34px;\n  text-align: center;\n  pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n  width: 46px;\n  height: 46px;\n  line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n  width: 30px;\n  height: 30px;\n  line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n  color: #3c763d;\n}\n.has-success .form-control {\n  border-color: #3c763d;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-success .form-control:focus {\n  border-color: #2b542c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #3c763d;\n}\n.has-success .form-control-feedback {\n  color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n  color: #8a6d3b;\n}\n.has-warning .form-control {\n  border-color: #8a6d3b;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-warning .form-control:focus {\n  border-color: #66512c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #8a6d3b;\n}\n.has-warning .form-control-feedback {\n  color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n  color: #a94442;\n}\n.has-error .form-control {\n  border-color: #a94442;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-error .form-control:focus {\n  border-color: #843534;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #a94442;\n}\n.has-error .form-control-feedback {\n  color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n  top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n  top: 0;\n}\n.help-block {\n  display: block;\n  margin-top: 5px;\n  margin-bottom: 10px;\n  color: #737373;\n}\n@media (min-width: 768px) {\n  .form-inline .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .form-control {\n    display: inline-block;\n    width: auto;\n    vertical-align: middle;\n  }\n  .form-inline .form-control-static {\n    display: inline-block;\n  }\n  .form-inline .input-group {\n    display: inline-table;\n    vertical-align: middle;\n  }\n  .form-inline .input-group .input-group-addon,\n  .form-inline .input-group .input-group-btn,\n  .form-inline .input-group .form-control {\n    width: auto;\n  }\n  .form-inline .input-group > .form-control {\n    width: 100%;\n  }\n  .form-inline .control-label {\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .radio,\n  .form-inline .checkbox {\n    display: inline-block;\n    margin-top: 0;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .radio label,\n  .form-inline .checkbox label {\n    padding-left: 0;\n  }\n  .form-inline .radio input[type=\"radio\"],\n  .form-inline .checkbox input[type=\"checkbox\"] {\n    position: relative;\n    margin-left: 0;\n  }\n  .form-inline .has-feedback .form-control-feedback {\n    top: 0;\n  }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n  padding-top: 7px;\n  margin-top: 0;\n  margin-bottom: 0;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n  min-height: 27px;\n}\n.form-horizontal .form-group {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n@media (min-width: 768px) {\n  .form-horizontal .control-label {\n    padding-top: 7px;\n    margin-bottom: 0;\n    text-align: right;\n  }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n  right: 15px;\n}\n@media (min-width: 768px) {\n  .form-horizontal .form-group-lg .control-label {\n    padding-top: 11px;\n    font-size: 18px;\n  }\n}\n@media (min-width: 768px) {\n  .form-horizontal .form-group-sm .control-label {\n    padding-top: 6px;\n    font-size: 12px;\n  }\n}\n.btn {\n  display: inline-block;\n  padding: 6px 12px;\n  margin-bottom: 0;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 1.42857143;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: middle;\n  -ms-touch-action: manipulation;\n      touch-action: manipulation;\n  cursor: pointer;\n  -webkit-user-select: none;\n     -moz-user-select: none;\n      -ms-user-select: none;\n          user-select: none;\n  background-image: none;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n  color: #333;\n  text-decoration: none;\n}\n.btn:active,\n.btn.active {\n  background-image: none;\n  outline: 0;\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n  cursor: not-allowed;\n  filter: alpha(opacity=65);\n  -webkit-box-shadow: none;\n          box-shadow: none;\n  opacity: .65;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n  pointer-events: none;\n}\n.btn-default {\n  color: #333;\n  background-color: #fff;\n  border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #8c8c8c;\n}\n.btn-default:hover {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n  color: #333;\n  background-color: #d4d4d4;\n  border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n  background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n  background-color: #fff;\n  border-color: #ccc;\n}\n.btn-default .badge {\n  color: #fff;\n  background-color: #333;\n}\n.btn-primary {\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n  color: #fff;\n  background-color: #286090;\n  border-color: #122b40;\n}\n.btn-primary:hover {\n  color: #fff;\n  background-color: #286090;\n  border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n  color: #fff;\n  background-color: #286090;\n  border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n  color: #fff;\n  background-color: #204d74;\n  border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n  background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n  background-color: #337ab7;\n  border-color: #2e6da4;\n}\n.btn-primary .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.btn-success {\n  color: #fff;\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #255625;\n}\n.btn-success:hover {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n  color: #fff;\n  background-color: #398439;\n  border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n  background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n.btn-success .badge {\n  color: #5cb85c;\n  background-color: #fff;\n}\n.btn-info {\n  color: #fff;\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #1b6d85;\n}\n.btn-info:hover {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n  color: #fff;\n  background-color: #269abc;\n  border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n  background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n.btn-info .badge {\n  color: #5bc0de;\n  background-color: #fff;\n}\n.btn-warning {\n  color: #fff;\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #985f0d;\n}\n.btn-warning:hover {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n  color: #fff;\n  background-color: #d58512;\n  border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n  background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n.btn-warning .badge {\n  color: #f0ad4e;\n  background-color: #fff;\n}\n.btn-danger {\n  color: #fff;\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #761c19;\n}\n.btn-danger:hover {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n  color: #fff;\n  background-color: #ac2925;\n  border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n  background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n.btn-danger .badge {\n  color: #d9534f;\n  background-color: #fff;\n}\n.btn-link {\n  font-weight: normal;\n  color: #337ab7;\n  border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n  background-color: transparent;\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n  border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n  color: #23527c;\n  text-decoration: underline;\n  background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n  color: #777;\n  text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n  padding: 1px 5px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.btn-block {\n  display: block;\n  width: 100%;\n}\n.btn-block + .btn-block {\n  margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n  width: 100%;\n}\n.fade {\n  opacity: 0;\n  -webkit-transition: opacity .15s linear;\n       -o-transition: opacity .15s linear;\n          transition: opacity .15s linear;\n}\n.fade.in {\n  opacity: 1;\n}\n.collapse {\n  display: none;\n}\n.collapse.in {\n  display: block;\n}\ntr.collapse.in {\n  display: table-row;\n}\ntbody.collapse.in {\n  display: table-row-group;\n}\n.collapsing {\n  position: relative;\n  height: 0;\n  overflow: hidden;\n  -webkit-transition-timing-function: ease;\n       -o-transition-timing-function: ease;\n          transition-timing-function: ease;\n  -webkit-transition-duration: .35s;\n       -o-transition-duration: .35s;\n          transition-duration: .35s;\n  -webkit-transition-property: height, visibility;\n       -o-transition-property: height, visibility;\n          transition-property: height, visibility;\n}\n.caret {\n  display: inline-block;\n  width: 0;\n  height: 0;\n  margin-left: 2px;\n  vertical-align: middle;\n  border-top: 4px dashed;\n  border-top: 4px solid \\9;\n  border-right: 4px solid transparent;\n  border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n  position: relative;\n}\n.dropdown-toggle:focus {\n  outline: 0;\n}\n.dropdown-menu {\n  position: absolute;\n  top: 100%;\n  left: 0;\n  z-index: 1000;\n  display: none;\n  float: left;\n  min-width: 160px;\n  padding: 5px 0;\n  margin: 2px 0 0;\n  font-size: 14px;\n  text-align: left;\n  list-style: none;\n  background-color: #fff;\n  -webkit-background-clip: padding-box;\n          background-clip: padding-box;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, .15);\n  border-radius: 4px;\n  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);\n          box-shadow: 0 6px 12px rgba(0, 0, 0, .175);\n}\n.dropdown-menu.pull-right {\n  right: 0;\n  left: auto;\n}\n.dropdown-menu .divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n  display: block;\n  padding: 3px 20px;\n  clear: both;\n  font-weight: normal;\n  line-height: 1.42857143;\n  color: #333;\n  white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  color: #262626;\n  text-decoration: none;\n  background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  color: #fff;\n  text-decoration: none;\n  background-color: #337ab7;\n  outline: 0;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  color: #777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  text-decoration: none;\n  cursor: not-allowed;\n  background-color: transparent;\n  background-image: none;\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.open > .dropdown-menu {\n  display: block;\n}\n.open > a {\n  outline: 0;\n}\n.dropdown-menu-right {\n  right: 0;\n  left: auto;\n}\n.dropdown-menu-left {\n  right: auto;\n  left: 0;\n}\n.dropdown-header {\n  display: block;\n  padding: 3px 20px;\n  font-size: 12px;\n  line-height: 1.42857143;\n  color: #777;\n  white-space: nowrap;\n}\n.dropdown-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 990;\n}\n.pull-right > .dropdown-menu {\n  right: 0;\n  left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n  content: \"\";\n  border-top: 0;\n  border-bottom: 4px dashed;\n  border-bottom: 4px solid \\9;\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n  top: auto;\n  bottom: 100%;\n  margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n  .navbar-right .dropdown-menu {\n    right: 0;\n    left: auto;\n  }\n  .navbar-right .dropdown-menu-left {\n    right: auto;\n    left: 0;\n  }\n}\n.btn-group,\n.btn-group-vertical {\n  position: relative;\n  display: inline-block;\n  vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n  position: relative;\n  float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n  z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n  margin-left: -1px;\n}\n.btn-toolbar {\n  margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n  float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n  margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n  border-radius: 0;\n}\n.btn-group > .btn:first-child {\n  margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group > .btn-group {\n  float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n  outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n  padding-right: 8px;\n  padding-left: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n  padding-right: 12px;\n  padding-left: 12px;\n}\n.btn-group.open .dropdown-toggle {\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\n.btn .caret {\n  margin-left: 0;\n}\n.btn-lg .caret {\n  border-width: 5px 5px 0;\n  border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n  border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n  display: block;\n  float: none;\n  width: 100%;\n  max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n  float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n  margin-top: -1px;\n  margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n  border-top-left-radius: 4px;\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.btn-group-justified {\n  display: table;\n  width: 100%;\n  table-layout: fixed;\n  border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n  display: table-cell;\n  float: none;\n  width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n  width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n  left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n  position: absolute;\n  clip: rect(0, 0, 0, 0);\n  pointer-events: none;\n}\n.input-group {\n  position: relative;\n  display: table;\n  border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n  float: none;\n  padding-right: 0;\n  padding-left: 0;\n}\n.input-group .form-control {\n  position: relative;\n  z-index: 2;\n  float: left;\n  width: 100%;\n  margin-bottom: 0;\n}\n.input-group .form-control:focus {\n  z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n  height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n  height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n  display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n  width: 1%;\n  white-space: nowrap;\n  vertical-align: middle;\n}\n.input-group-addon {\n  padding: 6px 12px;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 1;\n  color: #555;\n  text-align: center;\n  background-color: #eee;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n}\n.input-group-addon.input-sm {\n  padding: 5px 10px;\n  font-size: 12px;\n  border-radius: 3px;\n}\n.input-group-addon.input-lg {\n  padding: 10px 16px;\n  font-size: 18px;\n  border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n  margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n.input-group-addon:first-child {\n  border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.input-group-addon:last-child {\n  border-left: 0;\n}\n.input-group-btn {\n  position: relative;\n  font-size: 0;\n  white-space: nowrap;\n}\n.input-group-btn > .btn {\n  position: relative;\n}\n.input-group-btn > .btn + .btn {\n  margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n  z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n  margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n  z-index: 2;\n  margin-left: -1px;\n}\n.nav {\n  padding-left: 0;\n  margin-bottom: 0;\n  list-style: none;\n}\n.nav > li {\n  position: relative;\n  display: block;\n}\n.nav > li > a {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n  text-decoration: none;\n  background-color: #eee;\n}\n.nav > li.disabled > a {\n  color: #777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n  color: #777;\n  text-decoration: none;\n  cursor: not-allowed;\n  background-color: transparent;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n  background-color: #eee;\n  border-color: #337ab7;\n}\n.nav .nav-divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n.nav > li > a > img {\n  max-width: none;\n}\n.nav-tabs {\n  border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n  float: left;\n  margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n  margin-right: 2px;\n  line-height: 1.42857143;\n  border: 1px solid transparent;\n  border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n  border-color: #eee #eee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n  color: #555;\n  cursor: default;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-bottom-color: transparent;\n}\n.nav-tabs.nav-justified {\n  width: 100%;\n  border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n  float: none;\n}\n.nav-tabs.nav-justified > li > a {\n  margin-bottom: 5px;\n  text-align: center;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-tabs.nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n.nav-tabs.nav-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n  border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li > a {\n    border-bottom: 1px solid #ddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs.nav-justified > .active > a,\n  .nav-tabs.nav-justified > .active > a:hover,\n  .nav-tabs.nav-justified > .active > a:focus {\n    border-bottom-color: #fff;\n  }\n}\n.nav-pills > li {\n  float: left;\n}\n.nav-pills > li > a {\n  border-radius: 4px;\n}\n.nav-pills > li + li {\n  margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n  color: #fff;\n  background-color: #337ab7;\n}\n.nav-stacked > li {\n  float: none;\n}\n.nav-stacked > li + li {\n  margin-top: 2px;\n  margin-left: 0;\n}\n.nav-justified {\n  width: 100%;\n}\n.nav-justified > li {\n  float: none;\n}\n.nav-justified > li > a {\n  margin-bottom: 5px;\n  text-align: center;\n}\n.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n@media (min-width: 768px) {\n  .nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n.nav-tabs-justified {\n  border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n  border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n  .nav-tabs-justified > li > a {\n    border-bottom: 1px solid #ddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs-justified > .active > a,\n  .nav-tabs-justified > .active > a:hover,\n  .nav-tabs-justified > .active > a:focus {\n    border-bottom-color: #fff;\n  }\n}\n.tab-content > .tab-pane {\n  display: none;\n}\n.tab-content > .active {\n  display: block;\n}\n.nav-tabs .dropdown-menu {\n  margin-top: -1px;\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.navbar {\n  position: relative;\n  min-height: 50px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n  .navbar {\n    border-radius: 4px;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-header {\n    float: left;\n  }\n}\n.navbar-collapse {\n  padding-right: 15px;\n  padding-left: 15px;\n  overflow-x: visible;\n  -webkit-overflow-scrolling: touch;\n  border-top: 1px solid transparent;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);\n}\n.navbar-collapse.in {\n  overflow-y: auto;\n}\n@media (min-width: 768px) {\n  .navbar-collapse {\n    width: auto;\n    border-top: 0;\n    -webkit-box-shadow: none;\n            box-shadow: none;\n  }\n  .navbar-collapse.collapse {\n    display: block !important;\n    height: auto !important;\n    padding-bottom: 0;\n    overflow: visible !important;\n  }\n  .navbar-collapse.in {\n    overflow-y: visible;\n  }\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-static-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    padding-right: 0;\n    padding-left: 0;\n  }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n  max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    max-height: 200px;\n  }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n@media (min-width: 768px) {\n  .container > .navbar-header,\n  .container-fluid > .navbar-header,\n  .container > .navbar-collapse,\n  .container-fluid > .navbar-collapse {\n    margin-right: 0;\n    margin-left: 0;\n  }\n}\n.navbar-static-top {\n  z-index: 1000;\n  border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n  .navbar-static-top {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  position: fixed;\n  right: 0;\n  left: 0;\n  z-index: 1030;\n}\n@media (min-width: 768px) {\n  .navbar-fixed-top,\n  .navbar-fixed-bottom {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top {\n  top: 0;\n  border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n  bottom: 0;\n  margin-bottom: 0;\n  border-width: 1px 0 0;\n}\n.navbar-brand {\n  float: left;\n  height: 50px;\n  padding: 15px 15px;\n  font-size: 18px;\n  line-height: 20px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n  text-decoration: none;\n}\n.navbar-brand > img {\n  display: block;\n}\n@media (min-width: 768px) {\n  .navbar > .container .navbar-brand,\n  .navbar > .container-fluid .navbar-brand {\n    margin-left: -15px;\n  }\n}\n.navbar-toggle {\n  position: relative;\n  float: right;\n  padding: 9px 10px;\n  margin-top: 8px;\n  margin-right: 15px;\n  margin-bottom: 8px;\n  background-color: transparent;\n  background-image: none;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.navbar-toggle:focus {\n  outline: 0;\n}\n.navbar-toggle .icon-bar {\n  display: block;\n  width: 22px;\n  height: 2px;\n  border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n  margin-top: 4px;\n}\n@media (min-width: 768px) {\n  .navbar-toggle {\n    display: none;\n  }\n}\n.navbar-nav {\n  margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n  padding-top: 10px;\n  padding-bottom: 10px;\n  line-height: 20px;\n}\n@media (max-width: 767px) {\n  .navbar-nav .open .dropdown-menu {\n    position: static;\n    float: none;\n    width: auto;\n    margin-top: 0;\n    background-color: transparent;\n    border: 0;\n    -webkit-box-shadow: none;\n            box-shadow: none;\n  }\n  .navbar-nav .open .dropdown-menu > li > a,\n  .navbar-nav .open .dropdown-menu .dropdown-header {\n    padding: 5px 15px 5px 25px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a {\n    line-height: 20px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-nav .open .dropdown-menu > li > a:focus {\n    background-image: none;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-nav {\n    float: left;\n    margin: 0;\n  }\n  .navbar-nav > li {\n    float: left;\n  }\n  .navbar-nav > li > a {\n    padding-top: 15px;\n    padding-bottom: 15px;\n  }\n}\n.navbar-form {\n  padding: 10px 15px;\n  margin-top: 8px;\n  margin-right: -15px;\n  margin-bottom: 8px;\n  margin-left: -15px;\n  border-top: 1px solid transparent;\n  border-bottom: 1px solid transparent;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);\n}\n@media (min-width: 768px) {\n  .navbar-form .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control {\n    display: inline-block;\n    width: auto;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control-static {\n    display: inline-block;\n  }\n  .navbar-form .input-group {\n    display: inline-table;\n    vertical-align: middle;\n  }\n  .navbar-form .input-group .input-group-addon,\n  .navbar-form .input-group .input-group-btn,\n  .navbar-form .input-group .form-control {\n    width: auto;\n  }\n  .navbar-form .input-group > .form-control {\n    width: 100%;\n  }\n  .navbar-form .control-label {\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .radio,\n  .navbar-form .checkbox {\n    display: inline-block;\n    margin-top: 0;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .radio label,\n  .navbar-form .checkbox label {\n    padding-left: 0;\n  }\n  .navbar-form .radio input[type=\"radio\"],\n  .navbar-form .checkbox input[type=\"checkbox\"] {\n    position: relative;\n    margin-left: 0;\n  }\n  .navbar-form .has-feedback .form-control-feedback {\n    top: 0;\n  }\n}\n@media (max-width: 767px) {\n  .navbar-form .form-group {\n    margin-bottom: 5px;\n  }\n  .navbar-form .form-group:last-child {\n    margin-bottom: 0;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-form {\n    width: auto;\n    padding-top: 0;\n    padding-bottom: 0;\n    margin-right: 0;\n    margin-left: 0;\n    border: 0;\n    -webkit-box-shadow: none;\n            box-shadow: none;\n  }\n}\n.navbar-nav > li > .dropdown-menu {\n  margin-top: 0;\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n  margin-bottom: 0;\n  border-top-left-radius: 4px;\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.navbar-btn {\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n  margin-top: 14px;\n  margin-bottom: 14px;\n}\n.navbar-text {\n  margin-top: 15px;\n  margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n  .navbar-text {\n    float: left;\n    margin-right: 15px;\n    margin-left: 15px;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-left {\n    float: left !important;\n  }\n  .navbar-right {\n    float: right !important;\n    margin-right: -15px;\n  }\n  .navbar-right ~ .navbar-right {\n    margin-right: 0;\n  }\n}\n.navbar-default {\n  background-color: #f8f8f8;\n  border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n  color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n  color: #5e5e5e;\n  background-color: transparent;\n}\n.navbar-default .navbar-text {\n  color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n  color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n  color: #333;\n  background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n  color: #555;\n  background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n  color: #ccc;\n  background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n  border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n  background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n  background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n  border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n  color: #555;\n  background-color: #e7e7e7;\n}\n@media (max-width: 767px) {\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n    color: #777;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #333;\n    background-color: transparent;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #555;\n    background-color: #e7e7e7;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #ccc;\n    background-color: transparent;\n  }\n}\n.navbar-default .navbar-link {\n  color: #777;\n}\n.navbar-default .navbar-link:hover {\n  color: #333;\n}\n.navbar-default .btn-link {\n  color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n  color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n  color: #ccc;\n}\n.navbar-inverse {\n  background-color: #222;\n  border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n  color: #fff;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n  color: #fff;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n  color: #fff;\n  background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n  color: #444;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n  border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n  background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n  background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n  border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n  color: #fff;\n  background-color: #080808;\n}\n@media (max-width: 767px) {\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n    border-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n    color: #9d9d9d;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #fff;\n    background-color: transparent;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #fff;\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #444;\n    background-color: transparent;\n  }\n}\n.navbar-inverse .navbar-link {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n  color: #fff;\n}\n.navbar-inverse .btn-link {\n  color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n  color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n  color: #444;\n}\n.breadcrumb {\n  padding: 8px 15px;\n  margin-bottom: 20px;\n  list-style: none;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n}\n.breadcrumb > li {\n  display: inline-block;\n}\n.breadcrumb > li + li:before {\n  padding: 0 5px;\n  color: #ccc;\n  content: \"/\\00a0\";\n}\n.breadcrumb > .active {\n  color: #777;\n}\n.pagination {\n  display: inline-block;\n  padding-left: 0;\n  margin: 20px 0;\n  border-radius: 4px;\n}\n.pagination > li {\n  display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n  position: relative;\n  float: left;\n  padding: 6px 12px;\n  margin-left: -1px;\n  line-height: 1.42857143;\n  color: #337ab7;\n  text-decoration: none;\n  background-color: #fff;\n  border: 1px solid #ddd;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n  margin-left: 0;\n  border-top-left-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n  z-index: 2;\n  color: #23527c;\n  background-color: #eee;\n  border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n  z-index: 3;\n  color: #fff;\n  cursor: default;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n  color: #777;\n  cursor: not-allowed;\n  background-color: #fff;\n  border-color: #ddd;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n  border-top-left-radius: 6px;\n  border-bottom-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n  border-top-right-radius: 6px;\n  border-bottom-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n  border-top-left-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n  border-top-right-radius: 3px;\n  border-bottom-right-radius: 3px;\n}\n.pager {\n  padding-left: 0;\n  margin: 20px 0;\n  text-align: center;\n  list-style: none;\n}\n.pager li {\n  display: inline;\n}\n.pager li > a,\n.pager li > span {\n  display: inline-block;\n  padding: 5px 14px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n  text-decoration: none;\n  background-color: #eee;\n}\n.pager .next > a,\n.pager .next > span {\n  float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n  float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n  color: #777;\n  cursor: not-allowed;\n  background-color: #fff;\n}\n.label {\n  display: inline;\n  padding: .2em .6em .3em;\n  font-size: 75%;\n  font-weight: bold;\n  line-height: 1;\n  color: #fff;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: baseline;\n  border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.label:empty {\n  display: none;\n}\n.btn .label {\n  position: relative;\n  top: -1px;\n}\n.label-default {\n  background-color: #777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n  background-color: #5e5e5e;\n}\n.label-primary {\n  background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n  background-color: #286090;\n}\n.label-success {\n  background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n  background-color: #449d44;\n}\n.label-info {\n  background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n  background-color: #31b0d5;\n}\n.label-warning {\n  background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n  background-color: #ec971f;\n}\n.label-danger {\n  background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n  background-color: #c9302c;\n}\n.badge {\n  display: inline-block;\n  min-width: 10px;\n  padding: 3px 7px;\n  font-size: 12px;\n  font-weight: bold;\n  line-height: 1;\n  color: #fff;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: middle;\n  background-color: #777;\n  border-radius: 10px;\n}\n.badge:empty {\n  display: none;\n}\n.btn .badge {\n  position: relative;\n  top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n  top: 0;\n  padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.list-group-item > .badge {\n  float: right;\n}\n.list-group-item > .badge + .badge {\n  margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n  margin-left: 3px;\n}\n.jumbotron {\n  padding-top: 30px;\n  padding-bottom: 30px;\n  margin-bottom: 30px;\n  color: inherit;\n  background-color: #eee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n  color: inherit;\n}\n.jumbotron p {\n  margin-bottom: 15px;\n  font-size: 21px;\n  font-weight: 200;\n}\n.jumbotron > hr {\n  border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n  padding-right: 15px;\n  padding-left: 15px;\n  border-radius: 6px;\n}\n.jumbotron .container {\n  max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n  .jumbotron {\n    padding-top: 48px;\n    padding-bottom: 48px;\n  }\n  .container .jumbotron,\n  .container-fluid .jumbotron {\n    padding-right: 60px;\n    padding-left: 60px;\n  }\n  .jumbotron h1,\n  .jumbotron .h1 {\n    font-size: 63px;\n  }\n}\n.thumbnail {\n  display: block;\n  padding: 4px;\n  margin-bottom: 20px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 4px;\n  -webkit-transition: border .2s ease-in-out;\n       -o-transition: border .2s ease-in-out;\n          transition: border .2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n  margin-right: auto;\n  margin-left: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n  border-color: #337ab7;\n}\n.thumbnail .caption {\n  padding: 9px;\n  color: #333;\n}\n.alert {\n  padding: 15px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.alert h4 {\n  margin-top: 0;\n  color: inherit;\n}\n.alert .alert-link {\n  font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n  margin-bottom: 0;\n}\n.alert > p + p {\n  margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n  padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n  position: relative;\n  top: -2px;\n  right: -21px;\n  color: inherit;\n}\n.alert-success {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n}\n.alert-success hr {\n  border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n  color: #2b542c;\n}\n.alert-info {\n  color: #31708f;\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n}\n.alert-info hr {\n  border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n  color: #245269;\n}\n.alert-warning {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n}\n.alert-warning hr {\n  border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n  color: #66512c;\n}\n.alert-danger {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #ebccd1;\n}\n.alert-danger hr {\n  border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n  color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n@-o-keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n@keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n.progress {\n  height: 20px;\n  margin-bottom: 20px;\n  overflow: hidden;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);\n          box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);\n}\n.progress-bar {\n  float: left;\n  width: 0;\n  height: 100%;\n  font-size: 12px;\n  line-height: 20px;\n  color: #fff;\n  text-align: center;\n  background-color: #337ab7;\n  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);\n          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);\n  -webkit-transition: width .6s ease;\n       -o-transition: width .6s ease;\n          transition: width .6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  -webkit-background-size: 40px 40px;\n          background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n  -webkit-animation: progress-bar-stripes 2s linear infinite;\n       -o-animation: progress-bar-stripes 2s linear infinite;\n          animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n  background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n  background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n  background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n  background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.media {\n  margin-top: 15px;\n}\n.media:first-child {\n  margin-top: 0;\n}\n.media,\n.media-body {\n  overflow: hidden;\n  zoom: 1;\n}\n.media-body {\n  width: 10000px;\n}\n.media-object {\n  display: block;\n}\n.media-object.img-thumbnail {\n  max-width: none;\n}\n.media-right,\n.media > .pull-right {\n  padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n  padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n  display: table-cell;\n  vertical-align: top;\n}\n.media-middle {\n  vertical-align: middle;\n}\n.media-bottom {\n  vertical-align: bottom;\n}\n.media-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.media-list {\n  padding-left: 0;\n  list-style: none;\n}\n.list-group {\n  padding-left: 0;\n  margin-bottom: 20px;\n}\n.list-group-item {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n  margin-bottom: -1px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n  border-top-left-radius: 4px;\n  border-top-right-radius: 4px;\n}\n.list-group-item:last-child {\n  margin-bottom: 0;\n  border-bottom-right-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n  color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n  color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n  color: #555;\n  text-decoration: none;\n  background-color: #f5f5f5;\n}\nbutton.list-group-item {\n  width: 100%;\n  text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n  color: #777;\n  cursor: not-allowed;\n  background-color: #eee;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n  color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n  color: #777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  z-index: 2;\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n  color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n  color: #c7ddef;\n}\n.list-group-item-success {\n  color: #3c763d;\n  background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n  color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n  color: #3c763d;\n  background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n  color: #fff;\n  background-color: #3c763d;\n  border-color: #3c763d;\n}\n.list-group-item-info {\n  color: #31708f;\n  background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n  color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n  color: #31708f;\n  background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n  color: #fff;\n  background-color: #31708f;\n  border-color: #31708f;\n}\n.list-group-item-warning {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n  color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n  color: #8a6d3b;\n  background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n  color: #fff;\n  background-color: #8a6d3b;\n  border-color: #8a6d3b;\n}\n.list-group-item-danger {\n  color: #a94442;\n  background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n  color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n  color: #a94442;\n  background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n  color: #fff;\n  background-color: #a94442;\n  border-color: #a94442;\n}\n.list-group-item-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.list-group-item-text {\n  margin-bottom: 0;\n  line-height: 1.3;\n}\n.panel {\n  margin-bottom: 20px;\n  background-color: #fff;\n  border: 1px solid transparent;\n  border-radius: 4px;\n  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);\n          box-shadow: 0 1px 1px rgba(0, 0, 0, .05);\n}\n.panel-body {\n  padding: 15px;\n}\n.panel-heading {\n  padding: 10px 15px;\n  border-bottom: 1px solid transparent;\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n  color: inherit;\n}\n.panel-title {\n  margin-top: 0;\n  margin-bottom: 0;\n  font-size: 16px;\n  color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n  color: inherit;\n}\n.panel-footer {\n  padding: 10px 15px;\n  background-color: #f5f5f5;\n  border-top: 1px solid #ddd;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n  margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n  border-width: 1px 0;\n  border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n  border-top: 0;\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n  border-bottom: 0;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n  border-top-width: 0;\n}\n.list-group + .panel-footer {\n  border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n  margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n  padding-right: 15px;\n  padding-left: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n  border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n  border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n  border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n  border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n  border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n  border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n  border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n  border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n  border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n  border-bottom: 0;\n}\n.panel > .table-responsive {\n  margin-bottom: 0;\n  border: 0;\n}\n.panel-group {\n  margin-bottom: 20px;\n}\n.panel-group .panel {\n  margin-bottom: 0;\n  border-radius: 4px;\n}\n.panel-group .panel + .panel {\n  margin-top: 5px;\n}\n.panel-group .panel-heading {\n  border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n  border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n  border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n  border-bottom: 1px solid #ddd;\n}\n.panel-default {\n  border-color: #ddd;\n}\n.panel-default > .panel-heading {\n  color: #333;\n  background-color: #f5f5f5;\n  border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n  color: #f5f5f5;\n  background-color: #333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #ddd;\n}\n.panel-primary {\n  border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #337ab7;\n}\n.panel-success {\n  border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n  color: #dff0d8;\n  background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #d6e9c6;\n}\n.panel-info {\n  border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n  color: #31708f;\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n  color: #d9edf7;\n  background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #bce8f1;\n}\n.panel-warning {\n  border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n  color: #fcf8e3;\n  background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #faebcc;\n}\n.panel-danger {\n  border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n  color: #f2dede;\n  background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n  position: relative;\n  display: block;\n  height: 0;\n  padding: 0;\n  overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  border: 0;\n}\n.embed-responsive-16by9 {\n  padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n  padding-bottom: 75%;\n}\n.well {\n  min-height: 20px;\n  padding: 19px;\n  margin-bottom: 20px;\n  background-color: #f5f5f5;\n  border: 1px solid #e3e3e3;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);\n}\n.well blockquote {\n  border-color: #ddd;\n  border-color: rgba(0, 0, 0, .15);\n}\n.well-lg {\n  padding: 24px;\n  border-radius: 6px;\n}\n.well-sm {\n  padding: 9px;\n  border-radius: 3px;\n}\n.close {\n  float: right;\n  font-size: 21px;\n  font-weight: bold;\n  line-height: 1;\n  color: #000;\n  text-shadow: 0 1px 0 #fff;\n  filter: alpha(opacity=20);\n  opacity: .2;\n}\n.close:hover,\n.close:focus {\n  color: #000;\n  text-decoration: none;\n  cursor: pointer;\n  filter: alpha(opacity=50);\n  opacity: .5;\n}\nbutton.close {\n  -webkit-appearance: none;\n  padding: 0;\n  cursor: pointer;\n  background: transparent;\n  border: 0;\n}\n.modal-open {\n  overflow: hidden;\n}\n.modal {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1050;\n  display: none;\n  overflow: hidden;\n  -webkit-overflow-scrolling: touch;\n  outline: 0;\n}\n.modal.fade .modal-dialog {\n  -webkit-transition: -webkit-transform .3s ease-out;\n       -o-transition:      -o-transform .3s ease-out;\n          transition:         transform .3s ease-out;\n  -webkit-transform: translate(0, -25%);\n      -ms-transform: translate(0, -25%);\n       -o-transform: translate(0, -25%);\n          transform: translate(0, -25%);\n}\n.modal.in .modal-dialog {\n  -webkit-transform: translate(0, 0);\n      -ms-transform: translate(0, 0);\n       -o-transform: translate(0, 0);\n          transform: translate(0, 0);\n}\n.modal-open .modal {\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n.modal-dialog {\n  position: relative;\n  width: auto;\n  margin: 10px;\n}\n.modal-content {\n  position: relative;\n  background-color: #fff;\n  -webkit-background-clip: padding-box;\n          background-clip: padding-box;\n  border: 1px solid #999;\n  border: 1px solid rgba(0, 0, 0, .2);\n  border-radius: 6px;\n  outline: 0;\n  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);\n          box-shadow: 0 3px 9px rgba(0, 0, 0, .5);\n}\n.modal-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1040;\n  background-color: #000;\n}\n.modal-backdrop.fade {\n  filter: alpha(opacity=0);\n  opacity: 0;\n}\n.modal-backdrop.in {\n  filter: alpha(opacity=50);\n  opacity: .5;\n}\n.modal-header {\n  padding: 15px;\n  border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n  margin-top: -2px;\n}\n.modal-title {\n  margin: 0;\n  line-height: 1.42857143;\n}\n.modal-body {\n  position: relative;\n  padding: 15px;\n}\n.modal-footer {\n  padding: 15px;\n  text-align: right;\n  border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n  margin-bottom: 0;\n  margin-left: 5px;\n}\n.modal-footer .btn-group .btn + .btn {\n  margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n  margin-left: 0;\n}\n.modal-scrollbar-measure {\n  position: absolute;\n  top: -9999px;\n  width: 50px;\n  height: 50px;\n  overflow: scroll;\n}\n@media (min-width: 768px) {\n  .modal-dialog {\n    width: 600px;\n    margin: 30px auto;\n  }\n  .modal-content {\n    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n            box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n  }\n  .modal-sm {\n    width: 300px;\n  }\n}\n@media (min-width: 992px) {\n  .modal-lg {\n    width: 900px;\n  }\n}\n.tooltip {\n  position: absolute;\n  z-index: 1070;\n  display: block;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 12px;\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1.42857143;\n  text-align: left;\n  text-align: start;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  letter-spacing: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n  white-space: normal;\n  filter: alpha(opacity=0);\n  opacity: 0;\n\n  line-break: auto;\n}\n.tooltip.in {\n  filter: alpha(opacity=90);\n  opacity: .9;\n}\n.tooltip.top {\n  padding: 5px 0;\n  margin-top: -3px;\n}\n.tooltip.right {\n  padding: 0 5px;\n  margin-left: 3px;\n}\n.tooltip.bottom {\n  padding: 5px 0;\n  margin-top: 3px;\n}\n.tooltip.left {\n  padding: 0 5px;\n  margin-left: -3px;\n}\n.tooltip-inner {\n  max-width: 200px;\n  padding: 3px 8px;\n  color: #fff;\n  text-align: center;\n  background-color: #000;\n  border-radius: 4px;\n}\n.tooltip-arrow {\n  position: absolute;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n  bottom: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n  right: 5px;\n  bottom: 0;\n  margin-bottom: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n  bottom: 0;\n  left: 5px;\n  margin-bottom: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n  top: 50%;\n  left: 0;\n  margin-top: -5px;\n  border-width: 5px 5px 5px 0;\n  border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n  top: 50%;\n  right: 0;\n  margin-top: -5px;\n  border-width: 5px 0 5px 5px;\n  border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n  top: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n  top: 0;\n  right: 5px;\n  margin-top: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n  top: 0;\n  left: 5px;\n  margin-top: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.popover {\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 1060;\n  display: none;\n  max-width: 276px;\n  padding: 1px;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 14px;\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1.42857143;\n  text-align: left;\n  text-align: start;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  letter-spacing: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n  white-space: normal;\n  background-color: #fff;\n  -webkit-background-clip: padding-box;\n          background-clip: padding-box;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, .2);\n  border-radius: 6px;\n  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n          box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n\n  line-break: auto;\n}\n.popover.top {\n  margin-top: -10px;\n}\n.popover.right {\n  margin-left: 10px;\n}\n.popover.bottom {\n  margin-top: 10px;\n}\n.popover.left {\n  margin-left: -10px;\n}\n.popover-title {\n  padding: 8px 14px;\n  margin: 0;\n  font-size: 14px;\n  background-color: #f7f7f7;\n  border-bottom: 1px solid #ebebeb;\n  border-radius: 5px 5px 0 0;\n}\n.popover-content {\n  padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n  position: absolute;\n  display: block;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.popover > .arrow {\n  border-width: 11px;\n}\n.popover > .arrow:after {\n  content: \"\";\n  border-width: 10px;\n}\n.popover.top > .arrow {\n  bottom: -11px;\n  left: 50%;\n  margin-left: -11px;\n  border-top-color: #999;\n  border-top-color: rgba(0, 0, 0, .25);\n  border-bottom-width: 0;\n}\n.popover.top > .arrow:after {\n  bottom: 1px;\n  margin-left: -10px;\n  content: \" \";\n  border-top-color: #fff;\n  border-bottom-width: 0;\n}\n.popover.right > .arrow {\n  top: 50%;\n  left: -11px;\n  margin-top: -11px;\n  border-right-color: #999;\n  border-right-color: rgba(0, 0, 0, .25);\n  border-left-width: 0;\n}\n.popover.right > .arrow:after {\n  bottom: -10px;\n  left: 1px;\n  content: \" \";\n  border-right-color: #fff;\n  border-left-width: 0;\n}\n.popover.bottom > .arrow {\n  top: -11px;\n  left: 50%;\n  margin-left: -11px;\n  border-top-width: 0;\n  border-bottom-color: #999;\n  border-bottom-color: rgba(0, 0, 0, .25);\n}\n.popover.bottom > .arrow:after {\n  top: 1px;\n  margin-left: -10px;\n  content: \" \";\n  border-top-width: 0;\n  border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n  top: 50%;\n  right: -11px;\n  margin-top: -11px;\n  border-right-width: 0;\n  border-left-color: #999;\n  border-left-color: rgba(0, 0, 0, .25);\n}\n.popover.left > .arrow:after {\n  right: 1px;\n  bottom: -10px;\n  content: \" \";\n  border-right-width: 0;\n  border-left-color: #fff;\n}\n.carousel {\n  position: relative;\n}\n.carousel-inner {\n  position: relative;\n  width: 100%;\n  overflow: hidden;\n}\n.carousel-inner > .item {\n  position: relative;\n  display: none;\n  -webkit-transition: .6s ease-in-out left;\n       -o-transition: .6s ease-in-out left;\n          transition: .6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n  .carousel-inner > .item {\n    -webkit-transition: -webkit-transform .6s ease-in-out;\n         -o-transition:      -o-transform .6s ease-in-out;\n            transition:         transform .6s ease-in-out;\n\n    -webkit-backface-visibility: hidden;\n            backface-visibility: hidden;\n    -webkit-perspective: 1000px;\n            perspective: 1000px;\n  }\n  .carousel-inner > .item.next,\n  .carousel-inner > .item.active.right {\n    left: 0;\n    -webkit-transform: translate3d(100%, 0, 0);\n            transform: translate3d(100%, 0, 0);\n  }\n  .carousel-inner > .item.prev,\n  .carousel-inner > .item.active.left {\n    left: 0;\n    -webkit-transform: translate3d(-100%, 0, 0);\n            transform: translate3d(-100%, 0, 0);\n  }\n  .carousel-inner > .item.next.left,\n  .carousel-inner > .item.prev.right,\n  .carousel-inner > .item.active {\n    left: 0;\n    -webkit-transform: translate3d(0, 0, 0);\n            transform: translate3d(0, 0, 0);\n  }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  display: block;\n}\n.carousel-inner > .active {\n  left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  position: absolute;\n  top: 0;\n  width: 100%;\n}\n.carousel-inner > .next {\n  left: 100%;\n}\n.carousel-inner > .prev {\n  left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n  left: 0;\n}\n.carousel-inner > .active.left {\n  left: -100%;\n}\n.carousel-inner > .active.right {\n  left: 100%;\n}\n.carousel-control {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  width: 15%;\n  font-size: 20px;\n  color: #fff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);\n  background-color: rgba(0, 0, 0, 0);\n  filter: alpha(opacity=50);\n  opacity: .5;\n}\n.carousel-control.left {\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n  background-image:      -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n  background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001)));\n  background-image:         linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n  background-repeat: repeat-x;\n}\n.carousel-control.right {\n  right: 0;\n  left: auto;\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n  background-image:      -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n  background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5)));\n  background-image:         linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n  background-repeat: repeat-x;\n}\n.carousel-control:hover,\n.carousel-control:focus {\n  color: #fff;\n  text-decoration: none;\n  filter: alpha(opacity=90);\n  outline: 0;\n  opacity: .9;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n  position: absolute;\n  top: 50%;\n  z-index: 5;\n  display: inline-block;\n  margin-top: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n  left: 50%;\n  margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n  right: 50%;\n  margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n  width: 20px;\n  height: 20px;\n  font-family: serif;\n  line-height: 1;\n}\n.carousel-control .icon-prev:before {\n  content: '\\2039';\n}\n.carousel-control .icon-next:before {\n  content: '\\203a';\n}\n.carousel-indicators {\n  position: absolute;\n  bottom: 10px;\n  left: 50%;\n  z-index: 15;\n  width: 60%;\n  padding-left: 0;\n  margin-left: -30%;\n  text-align: center;\n  list-style: none;\n}\n.carousel-indicators li {\n  display: inline-block;\n  width: 10px;\n  height: 10px;\n  margin: 1px;\n  text-indent: -999px;\n  cursor: pointer;\n  background-color: #000 \\9;\n  background-color: rgba(0, 0, 0, 0);\n  border: 1px solid #fff;\n  border-radius: 10px;\n}\n.carousel-indicators .active {\n  width: 12px;\n  height: 12px;\n  margin: 0;\n  background-color: #fff;\n}\n.carousel-caption {\n  position: absolute;\n  right: 15%;\n  bottom: 20px;\n  left: 15%;\n  z-index: 10;\n  padding-top: 20px;\n  padding-bottom: 20px;\n  color: #fff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);\n}\n.carousel-caption .btn {\n  text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n  .carousel-control .glyphicon-chevron-left,\n  .carousel-control .glyphicon-chevron-right,\n  .carousel-control .icon-prev,\n  .carousel-control .icon-next {\n    width: 30px;\n    height: 30px;\n    margin-top: -10px;\n    font-size: 30px;\n  }\n  .carousel-control .glyphicon-chevron-left,\n  .carousel-control .icon-prev {\n    margin-left: -10px;\n  }\n  .carousel-control .glyphicon-chevron-right,\n  .carousel-control .icon-next {\n    margin-right: -10px;\n  }\n  .carousel-caption {\n    right: 20%;\n    left: 20%;\n    padding-bottom: 30px;\n  }\n  .carousel-indicators {\n    bottom: 20px;\n  }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n  display: table;\n  content: \" \";\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n  clear: both;\n}\n.center-block {\n  display: block;\n  margin-right: auto;\n  margin-left: auto;\n}\n.pull-right {\n  float: right !important;\n}\n.pull-left {\n  float: left !important;\n}\n.hide {\n  display: none !important;\n}\n.show {\n  display: block !important;\n}\n.invisible {\n  visibility: hidden;\n}\n.text-hide {\n  font: 0/0 a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n.hidden {\n  display: none !important;\n}\n.affix {\n  position: fixed;\n}\n@-ms-viewport {\n  width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n  display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n  display: none !important;\n}\n@media (max-width: 767px) {\n  .visible-xs {\n    display: block !important;\n  }\n  table.visible-xs {\n    display: table !important;\n  }\n  tr.visible-xs {\n    display: table-row !important;\n  }\n  th.visible-xs,\n  td.visible-xs {\n    display: table-cell !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-block {\n    display: block !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-inline {\n    display: inline !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm {\n    display: block !important;\n  }\n  table.visible-sm {\n    display: table !important;\n  }\n  tr.visible-sm {\n    display: table-row !important;\n  }\n  th.visible-sm,\n  td.visible-sm {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-block {\n    display: block !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md {\n    display: block !important;\n  }\n  table.visible-md {\n    display: table !important;\n  }\n  tr.visible-md {\n    display: table-row !important;\n  }\n  th.visible-md,\n  td.visible-md {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-block {\n    display: block !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg {\n    display: block !important;\n  }\n  table.visible-lg {\n    display: table !important;\n  }\n  tr.visible-lg {\n    display: table-row !important;\n  }\n  th.visible-lg,\n  td.visible-lg {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-block {\n    display: block !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (max-width: 767px) {\n  .hidden-xs {\n    display: none !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .hidden-sm {\n    display: none !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .hidden-md {\n    display: none !important;\n  }\n}\n@media (min-width: 1200px) {\n  .hidden-lg {\n    display: none !important;\n  }\n}\n.visible-print {\n  display: none !important;\n}\n@media print {\n  .visible-print {\n    display: block !important;\n  }\n  table.visible-print {\n    display: table !important;\n  }\n  tr.visible-print {\n    display: table-row !important;\n  }\n  th.visible-print,\n  td.visible-print {\n    display: table-cell !important;\n  }\n}\n.visible-print-block {\n  display: none !important;\n}\n@media print {\n  .visible-print-block {\n    display: block !important;\n  }\n}\n.visible-print-inline {\n  display: none !important;\n}\n@media print {\n  .visible-print-inline {\n    display: inline !important;\n  }\n}\n.visible-print-inline-block {\n  display: none !important;\n}\n@media print {\n  .visible-print-inline-block {\n    display: inline-block !important;\n  }\n}\n@media print {\n  .hidden-print {\n    display: none !important;\n  }\n}\n/*# sourceMappingURL=bootstrap.css.map */\n"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/bootstrap/dist/js/bootstrap.js",
    "content": "/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under the MIT license\n */\n\nif (typeof jQuery === 'undefined') {\n  throw new Error('Bootstrap\\'s JavaScript requires jQuery')\n}\n\n+function ($) {\n  'use strict';\n  var version = $.fn.jquery.split(' ')[0].split('.')\n  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {\n    throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')\n  }\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: transition.js v3.3.7\n * http://getbootstrap.com/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)\n  // ============================================================\n\n  function transitionEnd() {\n    var el = document.createElement('bootstrap')\n\n    var transEndEventNames = {\n      WebkitTransition : 'webkitTransitionEnd',\n      MozTransition    : 'transitionend',\n      OTransition      : 'oTransitionEnd otransitionend',\n      transition       : 'transitionend'\n    }\n\n    for (var name in transEndEventNames) {\n      if (el.style[name] !== undefined) {\n        return { end: transEndEventNames[name] }\n      }\n    }\n\n    return false // explicit for ie8 (  ._.)\n  }\n\n  // http://blog.alexmaccaw.com/css-transitions\n  $.fn.emulateTransitionEnd = function (duration) {\n    var called = false\n    var $el = this\n    $(this).one('bsTransitionEnd', function () { called = true })\n    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n    setTimeout(callback, duration)\n    return this\n  }\n\n  $(function () {\n    $.support.transition = transitionEnd()\n\n    if (!$.support.transition) return\n\n    $.event.special.bsTransitionEnd = {\n      bindType: $.support.transition.end,\n      delegateType: $.support.transition.end,\n      handle: function (e) {\n        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n      }\n    }\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: alert.js v3.3.7\n * http://getbootstrap.com/javascript/#alerts\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // ALERT CLASS DEFINITION\n  // ======================\n\n  var dismiss = '[data-dismiss=\"alert\"]'\n  var Alert   = function (el) {\n    $(el).on('click', dismiss, this.close)\n  }\n\n  Alert.VERSION = '3.3.7'\n\n  Alert.TRANSITION_DURATION = 150\n\n  Alert.prototype.close = function (e) {\n    var $this    = $(this)\n    var selector = $this.attr('data-target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n    }\n\n    var $parent = $(selector === '#' ? [] : selector)\n\n    if (e) e.preventDefault()\n\n    if (!$parent.length) {\n      $parent = $this.closest('.alert')\n    }\n\n    $parent.trigger(e = $.Event('close.bs.alert'))\n\n    if (e.isDefaultPrevented()) return\n\n    $parent.removeClass('in')\n\n    function removeElement() {\n      // detach from parent, fire event then clean up data\n      $parent.detach().trigger('closed.bs.alert').remove()\n    }\n\n    $.support.transition && $parent.hasClass('fade') ?\n      $parent\n        .one('bsTransitionEnd', removeElement)\n        .emulateTransitionEnd(Alert.TRANSITION_DURATION) :\n      removeElement()\n  }\n\n\n  // ALERT PLUGIN DEFINITION\n  // =======================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.alert')\n\n      if (!data) $this.data('bs.alert', (data = new Alert(this)))\n      if (typeof option == 'string') data[option].call($this)\n    })\n  }\n\n  var old = $.fn.alert\n\n  $.fn.alert             = Plugin\n  $.fn.alert.Constructor = Alert\n\n\n  // ALERT NO CONFLICT\n  // =================\n\n  $.fn.alert.noConflict = function () {\n    $.fn.alert = old\n    return this\n  }\n\n\n  // ALERT DATA-API\n  // ==============\n\n  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: button.js v3.3.7\n * http://getbootstrap.com/javascript/#buttons\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // BUTTON PUBLIC CLASS DEFINITION\n  // ==============================\n\n  var Button = function (element, options) {\n    this.$element  = $(element)\n    this.options   = $.extend({}, Button.DEFAULTS, options)\n    this.isLoading = false\n  }\n\n  Button.VERSION  = '3.3.7'\n\n  Button.DEFAULTS = {\n    loadingText: 'loading...'\n  }\n\n  Button.prototype.setState = function (state) {\n    var d    = 'disabled'\n    var $el  = this.$element\n    var val  = $el.is('input') ? 'val' : 'html'\n    var data = $el.data()\n\n    state += 'Text'\n\n    if (data.resetText == null) $el.data('resetText', $el[val]())\n\n    // push to event loop to allow forms to submit\n    setTimeout($.proxy(function () {\n      $el[val](data[state] == null ? this.options[state] : data[state])\n\n      if (state == 'loadingText') {\n        this.isLoading = true\n        $el.addClass(d).attr(d, d).prop(d, true)\n      } else if (this.isLoading) {\n        this.isLoading = false\n        $el.removeClass(d).removeAttr(d).prop(d, false)\n      }\n    }, this), 0)\n  }\n\n  Button.prototype.toggle = function () {\n    var changed = true\n    var $parent = this.$element.closest('[data-toggle=\"buttons\"]')\n\n    if ($parent.length) {\n      var $input = this.$element.find('input')\n      if ($input.prop('type') == 'radio') {\n        if ($input.prop('checked')) changed = false\n        $parent.find('.active').removeClass('active')\n        this.$element.addClass('active')\n      } else if ($input.prop('type') == 'checkbox') {\n        if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false\n        this.$element.toggleClass('active')\n      }\n      $input.prop('checked', this.$element.hasClass('active'))\n      if (changed) $input.trigger('change')\n    } else {\n      this.$element.attr('aria-pressed', !this.$element.hasClass('active'))\n      this.$element.toggleClass('active')\n    }\n  }\n\n\n  // BUTTON PLUGIN DEFINITION\n  // ========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.button')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\n      if (option == 'toggle') data.toggle()\n      else if (option) data.setState(option)\n    })\n  }\n\n  var old = $.fn.button\n\n  $.fn.button             = Plugin\n  $.fn.button.Constructor = Button\n\n\n  // BUTTON NO CONFLICT\n  // ==================\n\n  $.fn.button.noConflict = function () {\n    $.fn.button = old\n    return this\n  }\n\n\n  // BUTTON DATA-API\n  // ===============\n\n  $(document)\n    .on('click.bs.button.data-api', '[data-toggle^=\"button\"]', function (e) {\n      var $btn = $(e.target).closest('.btn')\n      Plugin.call($btn, 'toggle')\n      if (!($(e.target).is('input[type=\"radio\"], input[type=\"checkbox\"]'))) {\n        // Prevent double click on radios, and the double selections (so cancellation) on checkboxes\n        e.preventDefault()\n        // The target component still receive the focus\n        if ($btn.is('input,button')) $btn.trigger('focus')\n        else $btn.find('input:visible,button:visible').first().trigger('focus')\n      }\n    })\n    .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^=\"button\"]', function (e) {\n      $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))\n    })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: carousel.js v3.3.7\n * http://getbootstrap.com/javascript/#carousel\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // CAROUSEL CLASS DEFINITION\n  // =========================\n\n  var Carousel = function (element, options) {\n    this.$element    = $(element)\n    this.$indicators = this.$element.find('.carousel-indicators')\n    this.options     = options\n    this.paused      = null\n    this.sliding     = null\n    this.interval    = null\n    this.$active     = null\n    this.$items      = null\n\n    this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))\n\n    this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element\n      .on('mouseenter.bs.carousel', $.proxy(this.pause, this))\n      .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))\n  }\n\n  Carousel.VERSION  = '3.3.7'\n\n  Carousel.TRANSITION_DURATION = 600\n\n  Carousel.DEFAULTS = {\n    interval: 5000,\n    pause: 'hover',\n    wrap: true,\n    keyboard: true\n  }\n\n  Carousel.prototype.keydown = function (e) {\n    if (/input|textarea/i.test(e.target.tagName)) return\n    switch (e.which) {\n      case 37: this.prev(); break\n      case 39: this.next(); break\n      default: return\n    }\n\n    e.preventDefault()\n  }\n\n  Carousel.prototype.cycle = function (e) {\n    e || (this.paused = false)\n\n    this.interval && clearInterval(this.interval)\n\n    this.options.interval\n      && !this.paused\n      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))\n\n    return this\n  }\n\n  Carousel.prototype.getItemIndex = function (item) {\n    this.$items = item.parent().children('.item')\n    return this.$items.index(item || this.$active)\n  }\n\n  Carousel.prototype.getItemForDirection = function (direction, active) {\n    var activeIndex = this.getItemIndex(active)\n    var willWrap = (direction == 'prev' && activeIndex === 0)\n                || (direction == 'next' && activeIndex == (this.$items.length - 1))\n    if (willWrap && !this.options.wrap) return active\n    var delta = direction == 'prev' ? -1 : 1\n    var itemIndex = (activeIndex + delta) % this.$items.length\n    return this.$items.eq(itemIndex)\n  }\n\n  Carousel.prototype.to = function (pos) {\n    var that        = this\n    var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))\n\n    if (pos > (this.$items.length - 1) || pos < 0) return\n\n    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, \"slid\"\n    if (activeIndex == pos) return this.pause().cycle()\n\n    return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))\n  }\n\n  Carousel.prototype.pause = function (e) {\n    e || (this.paused = true)\n\n    if (this.$element.find('.next, .prev').length && $.support.transition) {\n      this.$element.trigger($.support.transition.end)\n      this.cycle(true)\n    }\n\n    this.interval = clearInterval(this.interval)\n\n    return this\n  }\n\n  Carousel.prototype.next = function () {\n    if (this.sliding) return\n    return this.slide('next')\n  }\n\n  Carousel.prototype.prev = function () {\n    if (this.sliding) return\n    return this.slide('prev')\n  }\n\n  Carousel.prototype.slide = function (type, next) {\n    var $active   = this.$element.find('.item.active')\n    var $next     = next || this.getItemForDirection(type, $active)\n    var isCycling = this.interval\n    var direction = type == 'next' ? 'left' : 'right'\n    var that      = this\n\n    if ($next.hasClass('active')) return (this.sliding = false)\n\n    var relatedTarget = $next[0]\n    var slideEvent = $.Event('slide.bs.carousel', {\n      relatedTarget: relatedTarget,\n      direction: direction\n    })\n    this.$element.trigger(slideEvent)\n    if (slideEvent.isDefaultPrevented()) return\n\n    this.sliding = true\n\n    isCycling && this.pause()\n\n    if (this.$indicators.length) {\n      this.$indicators.find('.active').removeClass('active')\n      var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])\n      $nextIndicator && $nextIndicator.addClass('active')\n    }\n\n    var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, \"slid\"\n    if ($.support.transition && this.$element.hasClass('slide')) {\n      $next.addClass(type)\n      $next[0].offsetWidth // force reflow\n      $active.addClass(direction)\n      $next.addClass(direction)\n      $active\n        .one('bsTransitionEnd', function () {\n          $next.removeClass([type, direction].join(' ')).addClass('active')\n          $active.removeClass(['active', direction].join(' '))\n          that.sliding = false\n          setTimeout(function () {\n            that.$element.trigger(slidEvent)\n          }, 0)\n        })\n        .emulateTransitionEnd(Carousel.TRANSITION_DURATION)\n    } else {\n      $active.removeClass('active')\n      $next.addClass('active')\n      this.sliding = false\n      this.$element.trigger(slidEvent)\n    }\n\n    isCycling && this.cycle()\n\n    return this\n  }\n\n\n  // CAROUSEL PLUGIN DEFINITION\n  // ==========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.carousel')\n      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n      var action  = typeof option == 'string' ? option : options.slide\n\n      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n      if (typeof option == 'number') data.to(option)\n      else if (action) data[action]()\n      else if (options.interval) data.pause().cycle()\n    })\n  }\n\n  var old = $.fn.carousel\n\n  $.fn.carousel             = Plugin\n  $.fn.carousel.Constructor = Carousel\n\n\n  // CAROUSEL NO CONFLICT\n  // ====================\n\n  $.fn.carousel.noConflict = function () {\n    $.fn.carousel = old\n    return this\n  }\n\n\n  // CAROUSEL DATA-API\n  // =================\n\n  var clickHandler = function (e) {\n    var href\n    var $this   = $(this)\n    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '')) // strip for ie7\n    if (!$target.hasClass('carousel')) return\n    var options = $.extend({}, $target.data(), $this.data())\n    var slideIndex = $this.attr('data-slide-to')\n    if (slideIndex) options.interval = false\n\n    Plugin.call($target, options)\n\n    if (slideIndex) {\n      $target.data('bs.carousel').to(slideIndex)\n    }\n\n    e.preventDefault()\n  }\n\n  $(document)\n    .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)\n    .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)\n\n  $(window).on('load', function () {\n    $('[data-ride=\"carousel\"]').each(function () {\n      var $carousel = $(this)\n      Plugin.call($carousel, $carousel.data())\n    })\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: collapse.js v3.3.7\n * http://getbootstrap.com/javascript/#collapse\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n/* jshint latedef: false */\n\n+function ($) {\n  'use strict';\n\n  // COLLAPSE PUBLIC CLASS DEFINITION\n  // ================================\n\n  var Collapse = function (element, options) {\n    this.$element      = $(element)\n    this.options       = $.extend({}, Collapse.DEFAULTS, options)\n    this.$trigger      = $('[data-toggle=\"collapse\"][href=\"#' + element.id + '\"],' +\n                           '[data-toggle=\"collapse\"][data-target=\"#' + element.id + '\"]')\n    this.transitioning = null\n\n    if (this.options.parent) {\n      this.$parent = this.getParent()\n    } else {\n      this.addAriaAndCollapsedClass(this.$element, this.$trigger)\n    }\n\n    if (this.options.toggle) this.toggle()\n  }\n\n  Collapse.VERSION  = '3.3.7'\n\n  Collapse.TRANSITION_DURATION = 350\n\n  Collapse.DEFAULTS = {\n    toggle: true\n  }\n\n  Collapse.prototype.dimension = function () {\n    var hasWidth = this.$element.hasClass('width')\n    return hasWidth ? 'width' : 'height'\n  }\n\n  Collapse.prototype.show = function () {\n    if (this.transitioning || this.$element.hasClass('in')) return\n\n    var activesData\n    var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')\n\n    if (actives && actives.length) {\n      activesData = actives.data('bs.collapse')\n      if (activesData && activesData.transitioning) return\n    }\n\n    var startEvent = $.Event('show.bs.collapse')\n    this.$element.trigger(startEvent)\n    if (startEvent.isDefaultPrevented()) return\n\n    if (actives && actives.length) {\n      Plugin.call(actives, 'hide')\n      activesData || actives.data('bs.collapse', null)\n    }\n\n    var dimension = this.dimension()\n\n    this.$element\n      .removeClass('collapse')\n      .addClass('collapsing')[dimension](0)\n      .attr('aria-expanded', true)\n\n    this.$trigger\n      .removeClass('collapsed')\n      .attr('aria-expanded', true)\n\n    this.transitioning = 1\n\n    var complete = function () {\n      this.$element\n        .removeClass('collapsing')\n        .addClass('collapse in')[dimension]('')\n      this.transitioning = 0\n      this.$element\n        .trigger('shown.bs.collapse')\n    }\n\n    if (!$.support.transition) return complete.call(this)\n\n    var scrollSize = $.camelCase(['scroll', dimension].join('-'))\n\n    this.$element\n      .one('bsTransitionEnd', $.proxy(complete, this))\n      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])\n  }\n\n  Collapse.prototype.hide = function () {\n    if (this.transitioning || !this.$element.hasClass('in')) return\n\n    var startEvent = $.Event('hide.bs.collapse')\n    this.$element.trigger(startEvent)\n    if (startEvent.isDefaultPrevented()) return\n\n    var dimension = this.dimension()\n\n    this.$element[dimension](this.$element[dimension]())[0].offsetHeight\n\n    this.$element\n      .addClass('collapsing')\n      .removeClass('collapse in')\n      .attr('aria-expanded', false)\n\n    this.$trigger\n      .addClass('collapsed')\n      .attr('aria-expanded', false)\n\n    this.transitioning = 1\n\n    var complete = function () {\n      this.transitioning = 0\n      this.$element\n        .removeClass('collapsing')\n        .addClass('collapse')\n        .trigger('hidden.bs.collapse')\n    }\n\n    if (!$.support.transition) return complete.call(this)\n\n    this.$element\n      [dimension](0)\n      .one('bsTransitionEnd', $.proxy(complete, this))\n      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)\n  }\n\n  Collapse.prototype.toggle = function () {\n    this[this.$element.hasClass('in') ? 'hide' : 'show']()\n  }\n\n  Collapse.prototype.getParent = function () {\n    return $(this.options.parent)\n      .find('[data-toggle=\"collapse\"][data-parent=\"' + this.options.parent + '\"]')\n      .each($.proxy(function (i, element) {\n        var $element = $(element)\n        this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)\n      }, this))\n      .end()\n  }\n\n  Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {\n    var isOpen = $element.hasClass('in')\n\n    $element.attr('aria-expanded', isOpen)\n    $trigger\n      .toggleClass('collapsed', !isOpen)\n      .attr('aria-expanded', isOpen)\n  }\n\n  function getTargetFromTrigger($trigger) {\n    var href\n    var target = $trigger.attr('data-target')\n      || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '') // strip for ie7\n\n    return $(target)\n  }\n\n\n  // COLLAPSE PLUGIN DEFINITION\n  // ==========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.collapse')\n      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n      if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.collapse\n\n  $.fn.collapse             = Plugin\n  $.fn.collapse.Constructor = Collapse\n\n\n  // COLLAPSE NO CONFLICT\n  // ====================\n\n  $.fn.collapse.noConflict = function () {\n    $.fn.collapse = old\n    return this\n  }\n\n\n  // COLLAPSE DATA-API\n  // =================\n\n  $(document).on('click.bs.collapse.data-api', '[data-toggle=\"collapse\"]', function (e) {\n    var $this   = $(this)\n\n    if (!$this.attr('data-target')) e.preventDefault()\n\n    var $target = getTargetFromTrigger($this)\n    var data    = $target.data('bs.collapse')\n    var option  = data ? 'toggle' : $this.data()\n\n    Plugin.call($target, option)\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: dropdown.js v3.3.7\n * http://getbootstrap.com/javascript/#dropdowns\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // DROPDOWN CLASS DEFINITION\n  // =========================\n\n  var backdrop = '.dropdown-backdrop'\n  var toggle   = '[data-toggle=\"dropdown\"]'\n  var Dropdown = function (element) {\n    $(element).on('click.bs.dropdown', this.toggle)\n  }\n\n  Dropdown.VERSION = '3.3.7'\n\n  function getParent($this) {\n    var selector = $this.attr('data-target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n    }\n\n    var $parent = selector && $(selector)\n\n    return $parent && $parent.length ? $parent : $this.parent()\n  }\n\n  function clearMenus(e) {\n    if (e && e.which === 3) return\n    $(backdrop).remove()\n    $(toggle).each(function () {\n      var $this         = $(this)\n      var $parent       = getParent($this)\n      var relatedTarget = { relatedTarget: this }\n\n      if (!$parent.hasClass('open')) return\n\n      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return\n\n      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))\n\n      if (e.isDefaultPrevented()) return\n\n      $this.attr('aria-expanded', 'false')\n      $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))\n    })\n  }\n\n  Dropdown.prototype.toggle = function (e) {\n    var $this = $(this)\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    clearMenus()\n\n    if (!isActive) {\n      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {\n        // if mobile we use a backdrop because click events don't delegate\n        $(document.createElement('div'))\n          .addClass('dropdown-backdrop')\n          .insertAfter($(this))\n          .on('click', clearMenus)\n      }\n\n      var relatedTarget = { relatedTarget: this }\n      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))\n\n      if (e.isDefaultPrevented()) return\n\n      $this\n        .trigger('focus')\n        .attr('aria-expanded', 'true')\n\n      $parent\n        .toggleClass('open')\n        .trigger($.Event('shown.bs.dropdown', relatedTarget))\n    }\n\n    return false\n  }\n\n  Dropdown.prototype.keydown = function (e) {\n    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return\n\n    var $this = $(this)\n\n    e.preventDefault()\n    e.stopPropagation()\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    if (!isActive && e.which != 27 || isActive && e.which == 27) {\n      if (e.which == 27) $parent.find(toggle).trigger('focus')\n      return $this.trigger('click')\n    }\n\n    var desc = ' li:not(.disabled):visible a'\n    var $items = $parent.find('.dropdown-menu' + desc)\n\n    if (!$items.length) return\n\n    var index = $items.index(e.target)\n\n    if (e.which == 38 && index > 0)                 index--         // up\n    if (e.which == 40 && index < $items.length - 1) index++         // down\n    if (!~index)                                    index = 0\n\n    $items.eq(index).trigger('focus')\n  }\n\n\n  // DROPDOWN PLUGIN DEFINITION\n  // ==========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.dropdown')\n\n      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n      if (typeof option == 'string') data[option].call($this)\n    })\n  }\n\n  var old = $.fn.dropdown\n\n  $.fn.dropdown             = Plugin\n  $.fn.dropdown.Constructor = Dropdown\n\n\n  // DROPDOWN NO CONFLICT\n  // ====================\n\n  $.fn.dropdown.noConflict = function () {\n    $.fn.dropdown = old\n    return this\n  }\n\n\n  // APPLY TO STANDARD DROPDOWN ELEMENTS\n  // ===================================\n\n  $(document)\n    .on('click.bs.dropdown.data-api', clearMenus)\n    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: modal.js v3.3.7\n * http://getbootstrap.com/javascript/#modals\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // MODAL CLASS DEFINITION\n  // ======================\n\n  var Modal = function (element, options) {\n    this.options             = options\n    this.$body               = $(document.body)\n    this.$element            = $(element)\n    this.$dialog             = this.$element.find('.modal-dialog')\n    this.$backdrop           = null\n    this.isShown             = null\n    this.originalBodyPad     = null\n    this.scrollbarWidth      = 0\n    this.ignoreBackdropClick = false\n\n    if (this.options.remote) {\n      this.$element\n        .find('.modal-content')\n        .load(this.options.remote, $.proxy(function () {\n          this.$element.trigger('loaded.bs.modal')\n        }, this))\n    }\n  }\n\n  Modal.VERSION  = '3.3.7'\n\n  Modal.TRANSITION_DURATION = 300\n  Modal.BACKDROP_TRANSITION_DURATION = 150\n\n  Modal.DEFAULTS = {\n    backdrop: true,\n    keyboard: true,\n    show: true\n  }\n\n  Modal.prototype.toggle = function (_relatedTarget) {\n    return this.isShown ? this.hide() : this.show(_relatedTarget)\n  }\n\n  Modal.prototype.show = function (_relatedTarget) {\n    var that = this\n    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })\n\n    this.$element.trigger(e)\n\n    if (this.isShown || e.isDefaultPrevented()) return\n\n    this.isShown = true\n\n    this.checkScrollbar()\n    this.setScrollbar()\n    this.$body.addClass('modal-open')\n\n    this.escape()\n    this.resize()\n\n    this.$element.on('click.dismiss.bs.modal', '[data-dismiss=\"modal\"]', $.proxy(this.hide, this))\n\n    this.$dialog.on('mousedown.dismiss.bs.modal', function () {\n      that.$element.one('mouseup.dismiss.bs.modal', function (e) {\n        if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true\n      })\n    })\n\n    this.backdrop(function () {\n      var transition = $.support.transition && that.$element.hasClass('fade')\n\n      if (!that.$element.parent().length) {\n        that.$element.appendTo(that.$body) // don't move modals dom position\n      }\n\n      that.$element\n        .show()\n        .scrollTop(0)\n\n      that.adjustDialog()\n\n      if (transition) {\n        that.$element[0].offsetWidth // force reflow\n      }\n\n      that.$element.addClass('in')\n\n      that.enforceFocus()\n\n      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })\n\n      transition ?\n        that.$dialog // wait for modal to slide in\n          .one('bsTransitionEnd', function () {\n            that.$element.trigger('focus').trigger(e)\n          })\n          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :\n        that.$element.trigger('focus').trigger(e)\n    })\n  }\n\n  Modal.prototype.hide = function (e) {\n    if (e) e.preventDefault()\n\n    e = $.Event('hide.bs.modal')\n\n    this.$element.trigger(e)\n\n    if (!this.isShown || e.isDefaultPrevented()) return\n\n    this.isShown = false\n\n    this.escape()\n    this.resize()\n\n    $(document).off('focusin.bs.modal')\n\n    this.$element\n      .removeClass('in')\n      .off('click.dismiss.bs.modal')\n      .off('mouseup.dismiss.bs.modal')\n\n    this.$dialog.off('mousedown.dismiss.bs.modal')\n\n    $.support.transition && this.$element.hasClass('fade') ?\n      this.$element\n        .one('bsTransitionEnd', $.proxy(this.hideModal, this))\n        .emulateTransitionEnd(Modal.TRANSITION_DURATION) :\n      this.hideModal()\n  }\n\n  Modal.prototype.enforceFocus = function () {\n    $(document)\n      .off('focusin.bs.modal') // guard against infinite focus loop\n      .on('focusin.bs.modal', $.proxy(function (e) {\n        if (document !== e.target &&\n            this.$element[0] !== e.target &&\n            !this.$element.has(e.target).length) {\n          this.$element.trigger('focus')\n        }\n      }, this))\n  }\n\n  Modal.prototype.escape = function () {\n    if (this.isShown && this.options.keyboard) {\n      this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {\n        e.which == 27 && this.hide()\n      }, this))\n    } else if (!this.isShown) {\n      this.$element.off('keydown.dismiss.bs.modal')\n    }\n  }\n\n  Modal.prototype.resize = function () {\n    if (this.isShown) {\n      $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))\n    } else {\n      $(window).off('resize.bs.modal')\n    }\n  }\n\n  Modal.prototype.hideModal = function () {\n    var that = this\n    this.$element.hide()\n    this.backdrop(function () {\n      that.$body.removeClass('modal-open')\n      that.resetAdjustments()\n      that.resetScrollbar()\n      that.$element.trigger('hidden.bs.modal')\n    })\n  }\n\n  Modal.prototype.removeBackdrop = function () {\n    this.$backdrop && this.$backdrop.remove()\n    this.$backdrop = null\n  }\n\n  Modal.prototype.backdrop = function (callback) {\n    var that = this\n    var animate = this.$element.hasClass('fade') ? 'fade' : ''\n\n    if (this.isShown && this.options.backdrop) {\n      var doAnimate = $.support.transition && animate\n\n      this.$backdrop = $(document.createElement('div'))\n        .addClass('modal-backdrop ' + animate)\n        .appendTo(this.$body)\n\n      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {\n        if (this.ignoreBackdropClick) {\n          this.ignoreBackdropClick = false\n          return\n        }\n        if (e.target !== e.currentTarget) return\n        this.options.backdrop == 'static'\n          ? this.$element[0].focus()\n          : this.hide()\n      }, this))\n\n      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow\n\n      this.$backdrop.addClass('in')\n\n      if (!callback) return\n\n      doAnimate ?\n        this.$backdrop\n          .one('bsTransitionEnd', callback)\n          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :\n        callback()\n\n    } else if (!this.isShown && this.$backdrop) {\n      this.$backdrop.removeClass('in')\n\n      var callbackRemove = function () {\n        that.removeBackdrop()\n        callback && callback()\n      }\n      $.support.transition && this.$element.hasClass('fade') ?\n        this.$backdrop\n          .one('bsTransitionEnd', callbackRemove)\n          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :\n        callbackRemove()\n\n    } else if (callback) {\n      callback()\n    }\n  }\n\n  // these following methods are used to handle overflowing modals\n\n  Modal.prototype.handleUpdate = function () {\n    this.adjustDialog()\n  }\n\n  Modal.prototype.adjustDialog = function () {\n    var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight\n\n    this.$element.css({\n      paddingLeft:  !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',\n      paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''\n    })\n  }\n\n  Modal.prototype.resetAdjustments = function () {\n    this.$element.css({\n      paddingLeft: '',\n      paddingRight: ''\n    })\n  }\n\n  Modal.prototype.checkScrollbar = function () {\n    var fullWindowWidth = window.innerWidth\n    if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8\n      var documentElementRect = document.documentElement.getBoundingClientRect()\n      fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)\n    }\n    this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth\n    this.scrollbarWidth = this.measureScrollbar()\n  }\n\n  Modal.prototype.setScrollbar = function () {\n    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)\n    this.originalBodyPad = document.body.style.paddingRight || ''\n    if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)\n  }\n\n  Modal.prototype.resetScrollbar = function () {\n    this.$body.css('padding-right', this.originalBodyPad)\n  }\n\n  Modal.prototype.measureScrollbar = function () { // thx walsh\n    var scrollDiv = document.createElement('div')\n    scrollDiv.className = 'modal-scrollbar-measure'\n    this.$body.append(scrollDiv)\n    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth\n    this.$body[0].removeChild(scrollDiv)\n    return scrollbarWidth\n  }\n\n\n  // MODAL PLUGIN DEFINITION\n  // =======================\n\n  function Plugin(option, _relatedTarget) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.modal')\n      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n      if (typeof option == 'string') data[option](_relatedTarget)\n      else if (options.show) data.show(_relatedTarget)\n    })\n  }\n\n  var old = $.fn.modal\n\n  $.fn.modal             = Plugin\n  $.fn.modal.Constructor = Modal\n\n\n  // MODAL NO CONFLICT\n  // =================\n\n  $.fn.modal.noConflict = function () {\n    $.fn.modal = old\n    return this\n  }\n\n\n  // MODAL DATA-API\n  // ==============\n\n  $(document).on('click.bs.modal.data-api', '[data-toggle=\"modal\"]', function (e) {\n    var $this   = $(this)\n    var href    = $this.attr('href')\n    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\\s]+$)/, ''))) // strip for ie7\n    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())\n\n    if ($this.is('a')) e.preventDefault()\n\n    $target.one('show.bs.modal', function (showEvent) {\n      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown\n      $target.one('hidden.bs.modal', function () {\n        $this.is(':visible') && $this.trigger('focus')\n      })\n    })\n    Plugin.call($target, option, this)\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: tooltip.js v3.3.7\n * http://getbootstrap.com/javascript/#tooltip\n * Inspired by the original jQuery.tipsy by Jason Frame\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // TOOLTIP PUBLIC CLASS DEFINITION\n  // ===============================\n\n  var Tooltip = function (element, options) {\n    this.type       = null\n    this.options    = null\n    this.enabled    = null\n    this.timeout    = null\n    this.hoverState = null\n    this.$element   = null\n    this.inState    = null\n\n    this.init('tooltip', element, options)\n  }\n\n  Tooltip.VERSION  = '3.3.7'\n\n  Tooltip.TRANSITION_DURATION = 150\n\n  Tooltip.DEFAULTS = {\n    animation: true,\n    placement: 'top',\n    selector: false,\n    template: '<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',\n    trigger: 'hover focus',\n    title: '',\n    delay: 0,\n    html: false,\n    container: false,\n    viewport: {\n      selector: 'body',\n      padding: 0\n    }\n  }\n\n  Tooltip.prototype.init = function (type, element, options) {\n    this.enabled   = true\n    this.type      = type\n    this.$element  = $(element)\n    this.options   = this.getOptions(options)\n    this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))\n    this.inState   = { click: false, hover: false, focus: false }\n\n    if (this.$element[0] instanceof document.constructor && !this.options.selector) {\n      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')\n    }\n\n    var triggers = this.options.trigger.split(' ')\n\n    for (var i = triggers.length; i--;) {\n      var trigger = triggers[i]\n\n      if (trigger == 'click') {\n        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))\n      } else if (trigger != 'manual') {\n        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'\n        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'\n\n        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))\n        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))\n      }\n    }\n\n    this.options.selector ?\n      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :\n      this.fixTitle()\n  }\n\n  Tooltip.prototype.getDefaults = function () {\n    return Tooltip.DEFAULTS\n  }\n\n  Tooltip.prototype.getOptions = function (options) {\n    options = $.extend({}, this.getDefaults(), this.$element.data(), options)\n\n    if (options.delay && typeof options.delay == 'number') {\n      options.delay = {\n        show: options.delay,\n        hide: options.delay\n      }\n    }\n\n    return options\n  }\n\n  Tooltip.prototype.getDelegateOptions = function () {\n    var options  = {}\n    var defaults = this.getDefaults()\n\n    this._options && $.each(this._options, function (key, value) {\n      if (defaults[key] != value) options[key] = value\n    })\n\n    return options\n  }\n\n  Tooltip.prototype.enter = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget).data('bs.' + this.type)\n\n    if (!self) {\n      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n      $(obj.currentTarget).data('bs.' + this.type, self)\n    }\n\n    if (obj instanceof $.Event) {\n      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true\n    }\n\n    if (self.tip().hasClass('in') || self.hoverState == 'in') {\n      self.hoverState = 'in'\n      return\n    }\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'in'\n\n    if (!self.options.delay || !self.options.delay.show) return self.show()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'in') self.show()\n    }, self.options.delay.show)\n  }\n\n  Tooltip.prototype.isInStateTrue = function () {\n    for (var key in this.inState) {\n      if (this.inState[key]) return true\n    }\n\n    return false\n  }\n\n  Tooltip.prototype.leave = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget).data('bs.' + this.type)\n\n    if (!self) {\n      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n      $(obj.currentTarget).data('bs.' + this.type, self)\n    }\n\n    if (obj instanceof $.Event) {\n      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false\n    }\n\n    if (self.isInStateTrue()) return\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'out'\n\n    if (!self.options.delay || !self.options.delay.hide) return self.hide()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'out') self.hide()\n    }, self.options.delay.hide)\n  }\n\n  Tooltip.prototype.show = function () {\n    var e = $.Event('show.bs.' + this.type)\n\n    if (this.hasContent() && this.enabled) {\n      this.$element.trigger(e)\n\n      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])\n      if (e.isDefaultPrevented() || !inDom) return\n      var that = this\n\n      var $tip = this.tip()\n\n      var tipId = this.getUID(this.type)\n\n      this.setContent()\n      $tip.attr('id', tipId)\n      this.$element.attr('aria-describedby', tipId)\n\n      if (this.options.animation) $tip.addClass('fade')\n\n      var placement = typeof this.options.placement == 'function' ?\n        this.options.placement.call(this, $tip[0], this.$element[0]) :\n        this.options.placement\n\n      var autoToken = /\\s?auto?\\s?/i\n      var autoPlace = autoToken.test(placement)\n      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'\n\n      $tip\n        .detach()\n        .css({ top: 0, left: 0, display: 'block' })\n        .addClass(placement)\n        .data('bs.' + this.type, this)\n\n      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)\n      this.$element.trigger('inserted.bs.' + this.type)\n\n      var pos          = this.getPosition()\n      var actualWidth  = $tip[0].offsetWidth\n      var actualHeight = $tip[0].offsetHeight\n\n      if (autoPlace) {\n        var orgPlacement = placement\n        var viewportDim = this.getPosition(this.$viewport)\n\n        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :\n                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :\n                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :\n                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :\n                    placement\n\n        $tip\n          .removeClass(orgPlacement)\n          .addClass(placement)\n      }\n\n      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)\n\n      this.applyPlacement(calculatedOffset, placement)\n\n      var complete = function () {\n        var prevHoverState = that.hoverState\n        that.$element.trigger('shown.bs.' + that.type)\n        that.hoverState = null\n\n        if (prevHoverState == 'out') that.leave(that)\n      }\n\n      $.support.transition && this.$tip.hasClass('fade') ?\n        $tip\n          .one('bsTransitionEnd', complete)\n          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n        complete()\n    }\n  }\n\n  Tooltip.prototype.applyPlacement = function (offset, placement) {\n    var $tip   = this.tip()\n    var width  = $tip[0].offsetWidth\n    var height = $tip[0].offsetHeight\n\n    // manually read margins because getBoundingClientRect includes difference\n    var marginTop = parseInt($tip.css('margin-top'), 10)\n    var marginLeft = parseInt($tip.css('margin-left'), 10)\n\n    // we must check for NaN for ie 8/9\n    if (isNaN(marginTop))  marginTop  = 0\n    if (isNaN(marginLeft)) marginLeft = 0\n\n    offset.top  += marginTop\n    offset.left += marginLeft\n\n    // $.fn.offset doesn't round pixel values\n    // so we use setOffset directly with our own function B-0\n    $.offset.setOffset($tip[0], $.extend({\n      using: function (props) {\n        $tip.css({\n          top: Math.round(props.top),\n          left: Math.round(props.left)\n        })\n      }\n    }, offset), 0)\n\n    $tip.addClass('in')\n\n    // check to see if placing tip in new offset caused the tip to resize itself\n    var actualWidth  = $tip[0].offsetWidth\n    var actualHeight = $tip[0].offsetHeight\n\n    if (placement == 'top' && actualHeight != height) {\n      offset.top = offset.top + height - actualHeight\n    }\n\n    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)\n\n    if (delta.left) offset.left += delta.left\n    else offset.top += delta.top\n\n    var isVertical          = /top|bottom/.test(placement)\n    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight\n    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'\n\n    $tip.offset(offset)\n    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)\n  }\n\n  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {\n    this.arrow()\n      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')\n      .css(isVertical ? 'top' : 'left', '')\n  }\n\n  Tooltip.prototype.setContent = function () {\n    var $tip  = this.tip()\n    var title = this.getTitle()\n\n    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)\n    $tip.removeClass('fade in top bottom left right')\n  }\n\n  Tooltip.prototype.hide = function (callback) {\n    var that = this\n    var $tip = $(this.$tip)\n    var e    = $.Event('hide.bs.' + this.type)\n\n    function complete() {\n      if (that.hoverState != 'in') $tip.detach()\n      if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.\n        that.$element\n          .removeAttr('aria-describedby')\n          .trigger('hidden.bs.' + that.type)\n      }\n      callback && callback()\n    }\n\n    this.$element.trigger(e)\n\n    if (e.isDefaultPrevented()) return\n\n    $tip.removeClass('in')\n\n    $.support.transition && $tip.hasClass('fade') ?\n      $tip\n        .one('bsTransitionEnd', complete)\n        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n      complete()\n\n    this.hoverState = null\n\n    return this\n  }\n\n  Tooltip.prototype.fixTitle = function () {\n    var $e = this.$element\n    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {\n      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')\n    }\n  }\n\n  Tooltip.prototype.hasContent = function () {\n    return this.getTitle()\n  }\n\n  Tooltip.prototype.getPosition = function ($element) {\n    $element   = $element || this.$element\n\n    var el     = $element[0]\n    var isBody = el.tagName == 'BODY'\n\n    var elRect    = el.getBoundingClientRect()\n    if (elRect.width == null) {\n      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093\n      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })\n    }\n    var isSvg = window.SVGElement && el instanceof window.SVGElement\n    // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.\n    // See https://github.com/twbs/bootstrap/issues/20280\n    var elOffset  = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())\n    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }\n    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null\n\n    return $.extend({}, elRect, scroll, outerDims, elOffset)\n  }\n\n  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {\n    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :\n           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :\n           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :\n        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }\n\n  }\n\n  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {\n    var delta = { top: 0, left: 0 }\n    if (!this.$viewport) return delta\n\n    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0\n    var viewportDimensions = this.getPosition(this.$viewport)\n\n    if (/right|left/.test(placement)) {\n      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll\n      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight\n      if (topEdgeOffset < viewportDimensions.top) { // top overflow\n        delta.top = viewportDimensions.top - topEdgeOffset\n      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow\n        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset\n      }\n    } else {\n      var leftEdgeOffset  = pos.left - viewportPadding\n      var rightEdgeOffset = pos.left + viewportPadding + actualWidth\n      if (leftEdgeOffset < viewportDimensions.left) { // left overflow\n        delta.left = viewportDimensions.left - leftEdgeOffset\n      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow\n        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset\n      }\n    }\n\n    return delta\n  }\n\n  Tooltip.prototype.getTitle = function () {\n    var title\n    var $e = this.$element\n    var o  = this.options\n\n    title = $e.attr('data-original-title')\n      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)\n\n    return title\n  }\n\n  Tooltip.prototype.getUID = function (prefix) {\n    do prefix += ~~(Math.random() * 1000000)\n    while (document.getElementById(prefix))\n    return prefix\n  }\n\n  Tooltip.prototype.tip = function () {\n    if (!this.$tip) {\n      this.$tip = $(this.options.template)\n      if (this.$tip.length != 1) {\n        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')\n      }\n    }\n    return this.$tip\n  }\n\n  Tooltip.prototype.arrow = function () {\n    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))\n  }\n\n  Tooltip.prototype.enable = function () {\n    this.enabled = true\n  }\n\n  Tooltip.prototype.disable = function () {\n    this.enabled = false\n  }\n\n  Tooltip.prototype.toggleEnabled = function () {\n    this.enabled = !this.enabled\n  }\n\n  Tooltip.prototype.toggle = function (e) {\n    var self = this\n    if (e) {\n      self = $(e.currentTarget).data('bs.' + this.type)\n      if (!self) {\n        self = new this.constructor(e.currentTarget, this.getDelegateOptions())\n        $(e.currentTarget).data('bs.' + this.type, self)\n      }\n    }\n\n    if (e) {\n      self.inState.click = !self.inState.click\n      if (self.isInStateTrue()) self.enter(self)\n      else self.leave(self)\n    } else {\n      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)\n    }\n  }\n\n  Tooltip.prototype.destroy = function () {\n    var that = this\n    clearTimeout(this.timeout)\n    this.hide(function () {\n      that.$element.off('.' + that.type).removeData('bs.' + that.type)\n      if (that.$tip) {\n        that.$tip.detach()\n      }\n      that.$tip = null\n      that.$arrow = null\n      that.$viewport = null\n      that.$element = null\n    })\n  }\n\n\n  // TOOLTIP PLUGIN DEFINITION\n  // =========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.tooltip')\n      var options = typeof option == 'object' && option\n\n      if (!data && /destroy|hide/.test(option)) return\n      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.tooltip\n\n  $.fn.tooltip             = Plugin\n  $.fn.tooltip.Constructor = Tooltip\n\n\n  // TOOLTIP NO CONFLICT\n  // ===================\n\n  $.fn.tooltip.noConflict = function () {\n    $.fn.tooltip = old\n    return this\n  }\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: popover.js v3.3.7\n * http://getbootstrap.com/javascript/#popovers\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // POPOVER PUBLIC CLASS DEFINITION\n  // ===============================\n\n  var Popover = function (element, options) {\n    this.init('popover', element, options)\n  }\n\n  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')\n\n  Popover.VERSION  = '3.3.7'\n\n  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {\n    placement: 'right',\n    trigger: 'click',\n    content: '',\n    template: '<div class=\"popover\" role=\"tooltip\"><div class=\"arrow\"></div><h3 class=\"popover-title\"></h3><div class=\"popover-content\"></div></div>'\n  })\n\n\n  // NOTE: POPOVER EXTENDS tooltip.js\n  // ================================\n\n  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)\n\n  Popover.prototype.constructor = Popover\n\n  Popover.prototype.getDefaults = function () {\n    return Popover.DEFAULTS\n  }\n\n  Popover.prototype.setContent = function () {\n    var $tip    = this.tip()\n    var title   = this.getTitle()\n    var content = this.getContent()\n\n    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)\n    $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events\n      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'\n    ](content)\n\n    $tip.removeClass('fade top bottom left right in')\n\n    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do\n    // this manually by checking the contents.\n    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()\n  }\n\n  Popover.prototype.hasContent = function () {\n    return this.getTitle() || this.getContent()\n  }\n\n  Popover.prototype.getContent = function () {\n    var $e = this.$element\n    var o  = this.options\n\n    return $e.attr('data-content')\n      || (typeof o.content == 'function' ?\n            o.content.call($e[0]) :\n            o.content)\n  }\n\n  Popover.prototype.arrow = function () {\n    return (this.$arrow = this.$arrow || this.tip().find('.arrow'))\n  }\n\n\n  // POPOVER PLUGIN DEFINITION\n  // =========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.popover')\n      var options = typeof option == 'object' && option\n\n      if (!data && /destroy|hide/.test(option)) return\n      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.popover\n\n  $.fn.popover             = Plugin\n  $.fn.popover.Constructor = Popover\n\n\n  // POPOVER NO CONFLICT\n  // ===================\n\n  $.fn.popover.noConflict = function () {\n    $.fn.popover = old\n    return this\n  }\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: scrollspy.js v3.3.7\n * http://getbootstrap.com/javascript/#scrollspy\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // SCROLLSPY CLASS DEFINITION\n  // ==========================\n\n  function ScrollSpy(element, options) {\n    this.$body          = $(document.body)\n    this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)\n    this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)\n    this.selector       = (this.options.target || '') + ' .nav li > a'\n    this.offsets        = []\n    this.targets        = []\n    this.activeTarget   = null\n    this.scrollHeight   = 0\n\n    this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))\n    this.refresh()\n    this.process()\n  }\n\n  ScrollSpy.VERSION  = '3.3.7'\n\n  ScrollSpy.DEFAULTS = {\n    offset: 10\n  }\n\n  ScrollSpy.prototype.getScrollHeight = function () {\n    return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)\n  }\n\n  ScrollSpy.prototype.refresh = function () {\n    var that          = this\n    var offsetMethod  = 'offset'\n    var offsetBase    = 0\n\n    this.offsets      = []\n    this.targets      = []\n    this.scrollHeight = this.getScrollHeight()\n\n    if (!$.isWindow(this.$scrollElement[0])) {\n      offsetMethod = 'position'\n      offsetBase   = this.$scrollElement.scrollTop()\n    }\n\n    this.$body\n      .find(this.selector)\n      .map(function () {\n        var $el   = $(this)\n        var href  = $el.data('target') || $el.attr('href')\n        var $href = /^#./.test(href) && $(href)\n\n        return ($href\n          && $href.length\n          && $href.is(':visible')\n          && [[$href[offsetMethod]().top + offsetBase, href]]) || null\n      })\n      .sort(function (a, b) { return a[0] - b[0] })\n      .each(function () {\n        that.offsets.push(this[0])\n        that.targets.push(this[1])\n      })\n  }\n\n  ScrollSpy.prototype.process = function () {\n    var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset\n    var scrollHeight = this.getScrollHeight()\n    var maxScroll    = this.options.offset + scrollHeight - this.$scrollElement.height()\n    var offsets      = this.offsets\n    var targets      = this.targets\n    var activeTarget = this.activeTarget\n    var i\n\n    if (this.scrollHeight != scrollHeight) {\n      this.refresh()\n    }\n\n    if (scrollTop >= maxScroll) {\n      return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)\n    }\n\n    if (activeTarget && scrollTop < offsets[0]) {\n      this.activeTarget = null\n      return this.clear()\n    }\n\n    for (i = offsets.length; i--;) {\n      activeTarget != targets[i]\n        && scrollTop >= offsets[i]\n        && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])\n        && this.activate(targets[i])\n    }\n  }\n\n  ScrollSpy.prototype.activate = function (target) {\n    this.activeTarget = target\n\n    this.clear()\n\n    var selector = this.selector +\n      '[data-target=\"' + target + '\"],' +\n      this.selector + '[href=\"' + target + '\"]'\n\n    var active = $(selector)\n      .parents('li')\n      .addClass('active')\n\n    if (active.parent('.dropdown-menu').length) {\n      active = active\n        .closest('li.dropdown')\n        .addClass('active')\n    }\n\n    active.trigger('activate.bs.scrollspy')\n  }\n\n  ScrollSpy.prototype.clear = function () {\n    $(this.selector)\n      .parentsUntil(this.options.target, '.active')\n      .removeClass('active')\n  }\n\n\n  // SCROLLSPY PLUGIN DEFINITION\n  // ===========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.scrollspy')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.scrollspy\n\n  $.fn.scrollspy             = Plugin\n  $.fn.scrollspy.Constructor = ScrollSpy\n\n\n  // SCROLLSPY NO CONFLICT\n  // =====================\n\n  $.fn.scrollspy.noConflict = function () {\n    $.fn.scrollspy = old\n    return this\n  }\n\n\n  // SCROLLSPY DATA-API\n  // ==================\n\n  $(window).on('load.bs.scrollspy.data-api', function () {\n    $('[data-spy=\"scroll\"]').each(function () {\n      var $spy = $(this)\n      Plugin.call($spy, $spy.data())\n    })\n  })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: tab.js v3.3.7\n * http://getbootstrap.com/javascript/#tabs\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // TAB CLASS DEFINITION\n  // ====================\n\n  var Tab = function (element) {\n    // jscs:disable requireDollarBeforejQueryAssignment\n    this.element = $(element)\n    // jscs:enable requireDollarBeforejQueryAssignment\n  }\n\n  Tab.VERSION = '3.3.7'\n\n  Tab.TRANSITION_DURATION = 150\n\n  Tab.prototype.show = function () {\n    var $this    = this.element\n    var $ul      = $this.closest('ul:not(.dropdown-menu)')\n    var selector = $this.data('target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n    }\n\n    if ($this.parent('li').hasClass('active')) return\n\n    var $previous = $ul.find('.active:last a')\n    var hideEvent = $.Event('hide.bs.tab', {\n      relatedTarget: $this[0]\n    })\n    var showEvent = $.Event('show.bs.tab', {\n      relatedTarget: $previous[0]\n    })\n\n    $previous.trigger(hideEvent)\n    $this.trigger(showEvent)\n\n    if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return\n\n    var $target = $(selector)\n\n    this.activate($this.closest('li'), $ul)\n    this.activate($target, $target.parent(), function () {\n      $previous.trigger({\n        type: 'hidden.bs.tab',\n        relatedTarget: $this[0]\n      })\n      $this.trigger({\n        type: 'shown.bs.tab',\n        relatedTarget: $previous[0]\n      })\n    })\n  }\n\n  Tab.prototype.activate = function (element, container, callback) {\n    var $active    = container.find('> .active')\n    var transition = callback\n      && $.support.transition\n      && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)\n\n    function next() {\n      $active\n        .removeClass('active')\n        .find('> .dropdown-menu > .active')\n          .removeClass('active')\n        .end()\n        .find('[data-toggle=\"tab\"]')\n          .attr('aria-expanded', false)\n\n      element\n        .addClass('active')\n        .find('[data-toggle=\"tab\"]')\n          .attr('aria-expanded', true)\n\n      if (transition) {\n        element[0].offsetWidth // reflow for transition\n        element.addClass('in')\n      } else {\n        element.removeClass('fade')\n      }\n\n      if (element.parent('.dropdown-menu').length) {\n        element\n          .closest('li.dropdown')\n            .addClass('active')\n          .end()\n          .find('[data-toggle=\"tab\"]')\n            .attr('aria-expanded', true)\n      }\n\n      callback && callback()\n    }\n\n    $active.length && transition ?\n      $active\n        .one('bsTransitionEnd', next)\n        .emulateTransitionEnd(Tab.TRANSITION_DURATION) :\n      next()\n\n    $active.removeClass('in')\n  }\n\n\n  // TAB PLUGIN DEFINITION\n  // =====================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.tab')\n\n      if (!data) $this.data('bs.tab', (data = new Tab(this)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.tab\n\n  $.fn.tab             = Plugin\n  $.fn.tab.Constructor = Tab\n\n\n  // TAB NO CONFLICT\n  // ===============\n\n  $.fn.tab.noConflict = function () {\n    $.fn.tab = old\n    return this\n  }\n\n\n  // TAB DATA-API\n  // ============\n\n  var clickHandler = function (e) {\n    e.preventDefault()\n    Plugin.call($(this), 'show')\n  }\n\n  $(document)\n    .on('click.bs.tab.data-api', '[data-toggle=\"tab\"]', clickHandler)\n    .on('click.bs.tab.data-api', '[data-toggle=\"pill\"]', clickHandler)\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: affix.js v3.3.7\n * http://getbootstrap.com/javascript/#affix\n * ========================================================================\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // AFFIX CLASS DEFINITION\n  // ======================\n\n  var Affix = function (element, options) {\n    this.options = $.extend({}, Affix.DEFAULTS, options)\n\n    this.$target = $(this.options.target)\n      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))\n      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))\n\n    this.$element     = $(element)\n    this.affixed      = null\n    this.unpin        = null\n    this.pinnedOffset = null\n\n    this.checkPosition()\n  }\n\n  Affix.VERSION  = '3.3.7'\n\n  Affix.RESET    = 'affix affix-top affix-bottom'\n\n  Affix.DEFAULTS = {\n    offset: 0,\n    target: window\n  }\n\n  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {\n    var scrollTop    = this.$target.scrollTop()\n    var position     = this.$element.offset()\n    var targetHeight = this.$target.height()\n\n    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false\n\n    if (this.affixed == 'bottom') {\n      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'\n      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'\n    }\n\n    var initializing   = this.affixed == null\n    var colliderTop    = initializing ? scrollTop : position.top\n    var colliderHeight = initializing ? targetHeight : height\n\n    if (offsetTop != null && scrollTop <= offsetTop) return 'top'\n    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'\n\n    return false\n  }\n\n  Affix.prototype.getPinnedOffset = function () {\n    if (this.pinnedOffset) return this.pinnedOffset\n    this.$element.removeClass(Affix.RESET).addClass('affix')\n    var scrollTop = this.$target.scrollTop()\n    var position  = this.$element.offset()\n    return (this.pinnedOffset = position.top - scrollTop)\n  }\n\n  Affix.prototype.checkPositionWithEventLoop = function () {\n    setTimeout($.proxy(this.checkPosition, this), 1)\n  }\n\n  Affix.prototype.checkPosition = function () {\n    if (!this.$element.is(':visible')) return\n\n    var height       = this.$element.height()\n    var offset       = this.options.offset\n    var offsetTop    = offset.top\n    var offsetBottom = offset.bottom\n    var scrollHeight = Math.max($(document).height(), $(document.body).height())\n\n    if (typeof offset != 'object')         offsetBottom = offsetTop = offset\n    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)\n    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)\n\n    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)\n\n    if (this.affixed != affix) {\n      if (this.unpin != null) this.$element.css('top', '')\n\n      var affixType = 'affix' + (affix ? '-' + affix : '')\n      var e         = $.Event(affixType + '.bs.affix')\n\n      this.$element.trigger(e)\n\n      if (e.isDefaultPrevented()) return\n\n      this.affixed = affix\n      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null\n\n      this.$element\n        .removeClass(Affix.RESET)\n        .addClass(affixType)\n        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')\n    }\n\n    if (affix == 'bottom') {\n      this.$element.offset({\n        top: scrollHeight - height - offsetBottom\n      })\n    }\n  }\n\n\n  // AFFIX PLUGIN DEFINITION\n  // =======================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.affix')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.affix\n\n  $.fn.affix             = Plugin\n  $.fn.affix.Constructor = Affix\n\n\n  // AFFIX NO CONFLICT\n  // =================\n\n  $.fn.affix.noConflict = function () {\n    $.fn.affix = old\n    return this\n  }\n\n\n  // AFFIX DATA-API\n  // ==============\n\n  $(window).on('load', function () {\n    $('[data-spy=\"affix\"]').each(function () {\n      var $spy = $(this)\n      var data = $spy.data()\n\n      data.offset = data.offset || {}\n\n      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom\n      if (data.offsetTop    != null) data.offset.top    = data.offsetTop\n\n      Plugin.call($spy, data)\n    })\n  })\n\n}(jQuery);\n"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/bootstrap/dist/js/npm.js",
    "content": "// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.\nrequire('../../js/transition.js')\nrequire('../../js/alert.js')\nrequire('../../js/button.js')\nrequire('../../js/carousel.js')\nrequire('../../js/collapse.js')\nrequire('../../js/dropdown.js')\nrequire('../../js/modal.js')\nrequire('../../js/tooltip.js')\nrequire('../../js/popover.js')\nrequire('../../js/scrollspy.js')\nrequire('../../js/tab.js')\nrequire('../../js/affix.js')"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/jquery/.bower.json",
    "content": "{\n  \"name\": \"jquery\",\n  \"main\": \"dist/jquery.js\",\n  \"license\": \"MIT\",\n  \"ignore\": [\n    \"package.json\"\n  ],\n  \"keywords\": [\n    \"jquery\",\n    \"javascript\",\n    \"browser\",\n    \"library\"\n  ],\n  \"homepage\": \"https://github.com/jquery/jquery-dist\",\n  \"version\": \"2.2.0\",\n  \"_release\": \"2.2.0\",\n  \"_resolution\": {\n    \"type\": \"version\",\n    \"tag\": \"2.2.0\",\n    \"commit\": \"6fc01e29bdad0964f62ef56d01297039cdcadbe5\"\n  },\n  \"_source\": \"git://github.com/jquery/jquery-dist.git\",\n  \"_target\": \"2.2.0\",\n  \"_originalSource\": \"jquery\"\n}"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/jquery/LICENSE.txt",
    "content": "Copyright jQuery Foundation and other contributors, https://jquery.org/\n\nThis software consists of voluntary contributions made by many\nindividuals. For exact contribution history, see the revision history\navailable at https://github.com/jquery/jquery\n\nThe following license applies to all parts of this software except as\ndocumented below:\n\n====\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n====\n\nAll files located in the node_modules and external directories are\nexternally maintained libraries used by this software which have their\nown licenses; we recommend you read them, as their terms may differ from\nthe terms above.\n"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/jquery/dist/jquery.js",
    "content": "/*!\n * jQuery JavaScript Library v2.2.0\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2016-01-08T20:02Z\n */\n\n(function( global, factory ) {\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n}(typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Support: Firefox 18+\n// Can't be in strict mode, several libs including ASP.NET trace\n// the stack via arguments.caller.callee and Firefox dies if\n// you try to trace through \"use strict\" call chains. (#13335)\n//\"use strict\";\nvar arr = [];\n\nvar document = window.document;\n\nvar slice = arr.slice;\n\nvar concat = arr.concat;\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar support = {};\n\n\n\nvar\n\tversion = \"2.2.0\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android<4.1\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n\n\t// Matches dashed string for camelizing\n\trmsPrefix = /^-ms-/,\n\trdashAlpha = /-([\\da-z])/gi,\n\n\t// Used by jQuery.camelCase as callback to replace()\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num != null ?\n\n\t\t\t// Return just the one element from the set\n\t\t\t( num < 0 ? this[ num + this.length ] : this[ num ] ) :\n\n\t\t\t// Return all the elements in a clean array\n\t\t\tslice.call( this );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\t\tret.context = this.context;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = jQuery.isArray( copy ) ) ) ) {\n\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray( src ) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject( src ) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type( obj ) === \"function\";\n\t},\n\n\tisArray: Array.isArray,\n\n\tisWindow: function( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t},\n\n\tisNumeric: function( obj ) {\n\n\t\t// parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t// adding 1 corrects loss of precision from parseFloat (#15100)\n\t\tvar realStringObj = obj && obj.toString();\n\t\treturn !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;\n\t},\n\n\tisPlainObject: function( obj ) {\n\n\t\t// Not plain objects:\n\t\t// - Any object or value whose internal [[Class]] property is not \"[object Object]\"\n\t\t// - DOM nodes\n\t\t// - window\n\t\tif ( jQuery.type( obj ) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( obj.constructor &&\n\t\t\t\t!hasOwn.call( obj.constructor.prototype, \"isPrototypeOf\" ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the function hasn't returned already, we're confident that\n\t\t// |obj| is a plain object, created by {} or constructed with new Object\n\t\treturn true;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\ttype: function( obj ) {\n\t\tif ( obj == null ) {\n\t\t\treturn obj + \"\";\n\t\t}\n\n\t\t// Support: Android<4.0, iOS<6 (functionish RegExp)\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\t\ttypeof obj;\n\t},\n\n\t// Evaluates a script in a global context\n\tglobalEval: function( code ) {\n\t\tvar script,\n\t\t\tindirect = eval;\n\n\t\tcode = jQuery.trim( code );\n\n\t\tif ( code ) {\n\n\t\t\t// If the code includes a valid, prologue position\n\t\t\t// strict mode pragma, execute code by injecting a\n\t\t\t// script tag into the document.\n\t\t\tif ( code.indexOf( \"use strict\" ) === 1 ) {\n\t\t\t\tscript = document.createElement( \"script\" );\n\t\t\t\tscript.text = code;\n\t\t\t\tdocument.head.appendChild( script ).parentNode.removeChild( script );\n\t\t\t} else {\n\n\t\t\t\t// Otherwise, avoid the DOM node creation, insertion\n\t\t\t\t// and removal by using an indirect global eval\n\n\t\t\t\tindirect( code );\n\t\t\t}\n\t\t}\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Support: IE9-11+\n\t// Microsoft forgot to hump their vendor prefix (#9572)\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android<4.1\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t\"\" :\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// Bind a function to a context, optionally partially applying any\n\t// arguments.\n\tproxy: function( fn, context ) {\n\t\tvar tmp, args, proxy;\n\n\t\tif ( typeof context === \"string\" ) {\n\t\t\ttmp = fn[ context ];\n\t\t\tcontext = fn;\n\t\t\tfn = tmp;\n\t\t}\n\n\t\t// Quick check to determine if target is callable, in the spec\n\t\t// this throws a TypeError, but we will just return undefined.\n\t\tif ( !jQuery.isFunction( fn ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Simulated bind\n\t\targs = slice.call( arguments, 2 );\n\t\tproxy = function() {\n\t\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t\t};\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\t\treturn proxy;\n\t},\n\n\tnow: Date.now,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\n// JSHint would error on this code due to the Symbol not being defined in ES5.\n// Defining this global in .jshintrc would create a danger of using the global\n// unguarded in another place, it seems safer to just disable JSHint for these\n// three lines.\n/* jshint ignore: start */\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n/* jshint ignore: end */\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: iOS 8.2 (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = jQuery.type( obj );\n\n\tif ( type === \"function\" || jQuery.isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.2.1\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2015-10-17\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// General-purpose constants\n\tMAX_NEGATIVE = 1 << 31,\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it's faster than native\n\t// http://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\trescape = /'|\\\\/g,\n\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t};\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, nidselect, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\t\tsetDocument( context );\n\t\t}\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( (m = match[1]) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[2] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!compilerCache[ selector + \" \" ] &&\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\n\t\t\t\tif ( nodeType !== 1 ) {\n\t\t\t\t\tnewContext = context;\n\t\t\t\t\tnewSelector = selector;\n\n\t\t\t\t// qSA looks outside Element context, which is not what we want\n\t\t\t\t// Thanks to Andrew Dupont for this workaround technique\n\t\t\t\t// Support: IE <=8\n\t\t\t\t// Exclude object elements\n\t\t\t\t} else if ( context.nodeName.toLowerCase() !== \"object\" ) {\n\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\tif ( (nid = context.getAttribute( \"id\" )) ) {\n\t\t\t\t\t\tnid = nid.replace( rescape, \"\\\\$&\" );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", (nid = expando) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\tnidselect = ridentifier.test( nid ) ? \"#\" + nid : \"[id='\" + nid + \"']\";\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = nidselect + \" \" + toSelector( groups[i] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\t\t\t\t}\n\n\t\t\t\tif ( newSelector ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n\tvar div = document.createElement(\"div\");\n\n\ttry {\n\t\treturn !!fn( div );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( div.parentNode ) {\n\t\t\tdiv.parentNode.removeChild( div );\n\t\t}\n\t\t// release memory in IE\n\t\tdiv = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, parent,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9-11, Edge\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\tif ( (parent = document.defaultView) && parent.top !== parent ) {\n\t\t// Support: IE 11\n\t\tif ( parent.addEventListener ) {\n\t\t\tparent.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( parent.attachEvent ) {\n\t\t\tparent.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( div ) {\n\t\tdiv.className = \"i\";\n\t\treturn !div.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( div ) {\n\t\tdiv.appendChild( document.createComment(\"\") );\n\t\treturn !div.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( div ) {\n\t\tdocElem.appendChild( div ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID find and filter\n\tif ( support.getById ) {\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\treturn m ? [ m ] : [];\n\t\t\t}\n\t\t};\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t} else {\n\t\t// Support: IE6/7\n\t\t// getElementById is not reliable as a find shortcut\n\t\tdelete Expr.find[\"ID\"];\n\n\t\tExpr.filter[\"ID\"] =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See http://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( div ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// http://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( div ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( div.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !div.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push(\"~=\");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibing-combinator selector` fails\n\t\t\tif ( !div.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( div ) {\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tdiv.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( div.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tdiv.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( div ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( div, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === document ? -1 :\n\t\t\t\tb === document ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!compilerCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch (e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[0] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": function( elem ) {\n\t\t\treturn elem.disabled === false;\n\t\t},\n\n\t\t\"disabled\": function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tcheckNonElements = base && dir === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\n\n\t\t\t\t\t\tif ( (oldCache = uniqueCache[ dir ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ dir ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", outermost ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context === document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\tif ( !context && elem.ownerDocument !== document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[0] = match[0].slice( 0 );\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\n\t\t\t\tExpr.relative[ tokens[1].type ] ) {\n\n\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[i];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( (seed = find(\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n\t\t\t\t)) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( div1 ) {\n\t// Should return 1, but returns 4 (following)\n\treturn div1.compareDocumentPosition( document.createElement(\"div\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( div ) {\n\tdiv.innerHTML = \"<a href='#'></a>\";\n\treturn div.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( div ) {\n\tdiv.innerHTML = \"<input/>\";\n\tdiv.firstChild.setAttribute( \"value\", \"\" );\n\treturn div.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( div ) {\n\treturn div.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/ );\n\n\n\nvar risSimple = /^.[^:#\\[\\.,]*$/;\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t/* jshint -W018 */\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t} );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\treturn elems.length === 1 && elem.nodeType === 1 ?\n\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\n\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\t\treturn elem.nodeType === 1;\n\t\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i,\n\t\t\tlen = this.length,\n\t\t\tret = [],\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\n\t\tret.selector = this.selector ? this.selector + \" \" + selector : selector;\n\t\treturn ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\t// Support: Blackberry 4.6\n\t\t\t\t\t// gEBID returns nodes no longer in the document (#6963)\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis.context = this[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\tif ( selector.selector !== undefined ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\n\t\t\t\tjQuery( selectors, context || this.context ) :\n\t\t\t\t0;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t// Always skip document fragments\n\t\t\t\tif ( cur.nodeType < 11 && ( pos ?\n\t\t\t\t\tpos.index( cur ) > -1 :\n\n\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn elem.contentDocument || jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnotwhite = ( /\\S+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( jQuery.isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && jQuery.type( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, listener list, final state\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ), \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ), \"rejected\" ],\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ) ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\t\t\t\t\tvar fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\n\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis === promise ? newDefer.promise() : this,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Keep pipe for back-compat\n\t\tpromise.pipe = promise.then;\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 3 ];\n\n\t\t\t// promise[ done | fail | progress ] = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add( function() {\n\n\t\t\t\t\t// state = [ resolved | rejected ]\n\t\t\t\t\tstate = stateString;\n\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n\t\t\t}\n\n\t\t\t// deferred[ resolve | reject | notify ]\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? promise : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\n\t\tvar i = 0,\n\t\t\tresolveValues = slice.call( arguments ),\n\t\t\tlength = resolveValues.length,\n\n\t\t\t// the count of uncompleted subordinates\n\t\t\tremaining = length !== 1 ||\n\t\t\t\t( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\n\n\t\t\t// the master Deferred.\n\t\t\t// If resolveValues consist of only a single Deferred, just use that.\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\n\n\t\t\t// Update function for both resolve and progress values\n\t\t\tupdateFunc = function( i, contexts, values ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tcontexts[ i ] = this;\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( values === progressValues ) {\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\n\t\t\t\t\t} else if ( !( --remaining ) ) {\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\n\t\t\tprogressValues, progressContexts, resolveContexts;\n\n\t\t// Add listeners to Deferred subordinates; treat others as resolved\n\t\tif ( length > 1 ) {\n\t\t\tprogressValues = new Array( length );\n\t\t\tprogressContexts = new Array( length );\n\t\t\tresolveContexts = new Array( length );\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\n\t\t\t\t\tresolveValues[ i ].promise()\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) )\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\n\t\t\t\t\t\t.fail( deferred.reject );\n\t\t\t\t} else {\n\t\t\t\t\t--remaining;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If we're not waiting on anything, resolve the master\n\t\tif ( !remaining ) {\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\n\t\t}\n\n\t\treturn deferred.promise();\n\t}\n} );\n\n\n// The deferred used on DOM ready\nvar readyList;\n\njQuery.fn.ready = function( fn ) {\n\n\t// Add the callback\n\tjQuery.ready.promise().done( fn );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Hold (or release) the ready event\n\tholdReady: function( hold ) {\n\t\tif ( hold ) {\n\t\t\tjQuery.readyWait++;\n\t\t} else {\n\t\t\tjQuery.ready( true );\n\t\t}\n\t},\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\n\t\t// Trigger any bound ready events\n\t\tif ( jQuery.fn.triggerHandler ) {\n\t\t\tjQuery( document ).triggerHandler( \"ready\" );\n\t\t\tjQuery( document ).off( \"ready\" );\n\t\t}\n\t}\n} );\n\n/**\n * The ready event handler and self cleanup method\n */\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\njQuery.ready.promise = function( obj ) {\n\tif ( !readyList ) {\n\n\t\treadyList = jQuery.Deferred();\n\n\t\t// Catch cases where $(document).ready() is called\n\t\t// after the browser event has already occurred.\n\t\t// Support: IE9-10 only\n\t\t// Older IE sometimes signals \"interactive\" too soon\n\t\tif ( document.readyState === \"complete\" ||\n\t\t\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\t\t\twindow.setTimeout( jQuery.ready );\n\n\t\t} else {\n\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( \"load\", completed );\n\t\t}\n\t}\n\treturn readyList.promise( obj );\n};\n\n// Kick off the DOM ready check even if the user does not\njQuery.ready.promise();\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( jQuery.type( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !jQuery.isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\tvalue :\n\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn chainable ?\n\t\telems :\n\n\t\t// Gets\n\t\tbulk ?\n\t\t\tfn.call( elems ) :\n\t\t\tlen ? fn( elems[ 0 ], key ) : emptyGet;\n};\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\t/* jshint -W018 */\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tregister: function( owner, initial ) {\n\t\tvar value = initial || {};\n\n\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t// use plain assignment\n\t\tif ( owner.nodeType ) {\n\t\t\towner[ this.expando ] = value;\n\n\t\t// Otherwise secure it in a non-enumerable, non-writable property\n\t\t// configurability must be true to allow the property to be\n\t\t// deleted with the delete operator\n\t\t} else {\n\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\tvalue: value,\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: true\n\t\t\t} );\n\t\t}\n\t\treturn owner[ this.expando ];\n\t},\n\tcache: function( owner ) {\n\n\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t// but we should not, see #8335.\n\t\t// Always return an empty object.\n\t\tif ( !acceptData( owner ) ) {\n\t\t\treturn {};\n\t\t}\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see #8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ data ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ prop ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\t\t\towner[ this.expando ] && owner[ this.expando ][ key ];\n\t},\n\taccess: function( owner, key, value ) {\n\t\tvar stored;\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\tstored = this.get( owner, key );\n\n\t\t\treturn stored !== undefined ?\n\t\t\t\tstored : this.get( owner, jQuery.camelCase( key ) );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i, name, camel,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === undefined ) {\n\t\t\tthis.register( owner );\n\n\t\t} else {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( jQuery.isArray( key ) ) {\n\n\t\t\t\t// If \"name\" is an array of keys...\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\n\t\t\t\t// keys will be converted to camelCase.\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\n\t\t\t\t// both plain key and camelCase key. #12786\n\t\t\t\t// This will only penalize the array argument path.\n\t\t\t\tname = key.concat( key.map( jQuery.camelCase ) );\n\t\t\t} else {\n\t\t\t\tcamel = jQuery.camelCase( key );\n\n\t\t\t\t// Try the string as a key before any manipulation\n\t\t\t\tif ( key in cache ) {\n\t\t\t\t\tname = [ key, camel ];\n\t\t\t\t} else {\n\n\t\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\t\tname = camel;\n\t\t\t\t\tname = name in cache ?\n\t\t\t\t\t\t[ name ] : ( name.match( rnotwhite ) || [] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ti = name.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ name[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <= 35-45+\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://code.google.com/p/chromium/issues/detail?id=378607\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\t\tdata === \"false\" ? false :\n\t\t\t\t\tdata === \"null\" ? null :\n\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\n\t\t\t\t\t+data + \"\" === data ? +data :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\tdata;\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE11+\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data, camelKey;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// with the key as-is\n\t\t\t\tdata = dataUser.get( elem, key ) ||\n\n\t\t\t\t\t// Try to find dashed key if it exists (gh-2779)\n\t\t\t\t\t// This is for 2.2.x only\n\t\t\t\t\tdataUser.get( elem, key.replace( rmultiDash, \"-$&\" ).toLowerCase() );\n\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\tcamelKey = jQuery.camelCase( key );\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// with the key camelized\n\t\t\t\tdata = dataUser.get( elem, camelKey );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, camelKey, undefined );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tcamelKey = jQuery.camelCase( key );\n\t\t\tthis.each( function() {\n\n\t\t\t\t// First, attempt to store a copy or reference of any\n\t\t\t\t// data that might've been store with a camelCased key.\n\t\t\t\tvar data = dataUser.get( this, camelKey );\n\n\t\t\t\t// For HTML5 data-* attribute interop, we have to\n\t\t\t\t// store property names with dashes in a camelCase form.\n\t\t\t\t// This might not apply to all properties...*\n\t\t\t\tdataUser.set( this, camelKey, value );\n\n\t\t\t\t// *... In the case of properties that might _actually_\n\t\t\t\t// have dashes, we need to also store a copy of that\n\t\t\t\t// unchanged property.\n\t\t\t\tif ( key.indexOf( \"-\" ) > -1 && data !== undefined ) {\n\t\t\t\t\tdataUser.set( this, key, value );\n\t\t\t\t}\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || jQuery.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar isHidden = function( elem, el ) {\n\n\t\t// isHidden might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\t\treturn jQuery.css( elem, \"display\" ) === \"none\" ||\n\t\t\t!jQuery.contains( elem.ownerDocument, elem );\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted,\n\t\tscale = 1,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() { return tween.cur(); } :\n\t\t\tfunction() { return jQuery.css( elem, prop, \"\" ); },\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\tdo {\n\n\t\t\t// If previous iteration zeroed out, double until we get *something*.\n\t\t\t// Use string for doubling so we don't accidentally see scale as unchanged below\n\t\t\tscale = scale || \".5\";\n\n\t\t\t// Adjust and apply\n\t\t\tinitialInUnit = initialInUnit / scale;\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Update scale, tolerating zero or NaN from tween.cur()\n\t\t// Break the loop if scale is unchanged or perfect, or if we've just had enough.\n\t\t} while (\n\t\t\tscale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations\n\t\t);\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([\\w:-]+)/ );\n\nvar rscriptType = ( /^$|\\/(?:java|ecma)script/i );\n\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\n\t// Support: IE9\n\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\n// Support: IE9\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE9-11+\n\t// Use typeof to avoid zero-argument method invocation on host objects (#15151)\n\tvar ret = typeof context.getElementsByTagName !== \"undefined\" ?\n\t\t\tcontext.getElementsByTagName( tag || \"*\" ) :\n\t\t\ttypeof context.querySelectorAll !== \"undefined\" ?\n\t\t\t\tcontext.querySelectorAll( tag || \"*\" ) :\n\t\t\t[];\n\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\n\t\tjQuery.merge( [ context ], ret ) :\n\t\tret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, contains, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (#12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( contains ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0-4.3, Safari<=5.1\n\t// Check state lost if the name is set (#11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Safari<=5.1, Android<4.2\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE<=11+\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n} )();\n\n\nvar\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE9\n// See #13393 for more info\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn this;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( event ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tevent = jQuery.event.fix( event );\n\n\t\tvar i, j, ret, matched, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\targs = slice.call( arguments ),\n\t\t\thandlers = ( dataPriv.get( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// Triggered event must either 1) have no namespace, or 2) have namespace(s)\n\t\t\t\t// a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, matches, sel, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Support (at least): Chrome, IE9\n\t\t// Find delegate handlers\n\t\t// Black-hole SVG <use> instance trees (#13180)\n\t\t//\n\t\t// Support: Firefox<=42+\n\t\t// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)\n\t\tif ( delegateCount && cur.nodeType &&\n\t\t\t( event.type !== \"click\" || isNaN( event.button ) || event.button < 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== \"click\" ) ) {\n\t\t\t\t\tmatches = [];\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matches[ sel ] ) {\n\t\t\t\t\t\t\tmatches.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matches.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matches } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\t// Includes some event props shared by KeyEvent and MouseEvent\n\tprops: ( \"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase \" +\n\t\t\"metaKey relatedTarget shiftKey target timeStamp view which\" ).split( \" \" ),\n\n\tfixHooks: {},\n\n\tkeyHooks: {\n\t\tprops: \"char charCode key keyCode\".split( \" \" ),\n\t\tfilter: function( event, original ) {\n\n\t\t\t// Add which for key events\n\t\t\tif ( event.which == null ) {\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tmouseHooks: {\n\t\tprops: ( \"button buttons clientX clientY offsetX offsetY pageX pageY \" +\n\t\t\t\"screenX screenY toElement\" ).split( \" \" ),\n\t\tfilter: function( event, original ) {\n\t\t\tvar eventDoc, doc, body,\n\t\t\t\tbutton = original.button;\n\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\n\t\t\t\teventDoc = event.target.ownerDocument || document;\n\t\t\t\tdoc = eventDoc.documentElement;\n\t\t\t\tbody = eventDoc.body;\n\n\t\t\t\tevent.pageX = original.clientX +\n\t\t\t\t\t( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -\n\t\t\t\t\t( doc && doc.clientLeft || body && body.clientLeft || 0 );\n\t\t\t\tevent.pageY = original.clientY +\n\t\t\t\t\t( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) -\n\t\t\t\t\t( doc && doc.clientTop  || body && body.clientTop  || 0 );\n\t\t\t}\n\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t\t// Note: button is not normalized, so don't use it\n\t\t\tif ( !event.which && button !== undefined ) {\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tfix: function( event ) {\n\t\tif ( event[ jQuery.expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// Create a writable copy of the event object and normalize some properties\n\t\tvar i, prop, copy,\n\t\t\ttype = event.type,\n\t\t\toriginalEvent = event,\n\t\t\tfixHook = this.fixHooks[ type ];\n\n\t\tif ( !fixHook ) {\n\t\t\tthis.fixHooks[ type ] = fixHook =\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\n\t\t\t\t{};\n\t\t}\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n\t\tevent = new jQuery.Event( originalEvent );\n\n\t\ti = copy.length;\n\t\twhile ( i-- ) {\n\t\t\tprop = copy[ i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Support: Cordova 2.5 (WebKit) (#13255)\n\t\t// All events should have a target; Cordova deviceready doesn't\n\t\tif ( !event.target ) {\n\t\t\tevent.target = document;\n\t\t}\n\n\t\t// Support: Safari 6.0+, Chrome<28\n\t\t// Target should not be a text node (#504, #13143)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tfocus: {\n\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\n\t\t\t\t\tthis.focus();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusin\"\n\t\t},\n\t\tblur: {\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusout\"\n\t\t},\n\t\tclick: {\n\n\t\t\t// For checkbox, fire native event so checked state will be right\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this.type === \"checkbox\" && this.click && jQuery.nodeName( this, \"input\" ) ) {\n\t\t\t\t\tthis.click();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\n\t\t\t_default: function( event ) {\n\t\t\t\treturn jQuery.nodeName( event.target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android<4.0\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://code.google.com/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi,\n\n\t// Support: IE 10-11, Edge 10240+\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trscriptTypeMasked = /^true\\/(.*)/,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;\n\nfunction manipulationTarget( elem, content ) {\n\tif ( jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn elem.getElementsByTagName( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tvar match = rscriptTypeMasked.exec( elem.type );\n\n\tif ( match ) {\n\t\telem.type = match[ 1 ];\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.access( src );\n\t\tpdataCur = dataPriv.set( dest, pdataOld );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdelete pdataCur.handle;\n\t\t\tpdataCur.events = {};\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = concat.apply( [], args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tisFunction = jQuery.isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( isFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( isFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tjQuery.globalEval( node.textContent.replace( rcleanScript, \"\" ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && jQuery.contains( node.ownerDocument, node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html.replace( rxhtmlTag, \"<$1></$2>\" );\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <= 35-45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <= 35-45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\n\t// Keep domManip exposed until 3.0 (gh-2225)\n\tdomManip: domManip,\n\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: QtWebKit\n\t\t\t// .get() because push.apply(_, arraylike) throws\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\n\n\nvar iframe,\n\telemdisplay = {\n\n\t\t// Support: Firefox\n\t\t// We have to pre-define these values for FF (#10227)\n\t\tHTML: \"block\",\n\t\tBODY: \"block\"\n\t};\n\n/**\n * Retrieve the actual display of a element\n * @param {String} name nodeName of the element\n * @param {Object} doc Document object\n */\n\n// Called only from within defaultDisplay\nfunction actualDisplay( name, doc ) {\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\n\n\t\tdisplay = jQuery.css( elem[ 0 ], \"display\" );\n\n\t// We don't have any data stored on the element,\n\t// so use \"detach\" method as fast way to get rid of the element\n\telem.detach();\n\n\treturn display;\n}\n\n/**\n * Try to determine the default display value of an element\n * @param {String} nodeName\n */\nfunction defaultDisplay( nodeName ) {\n\tvar doc = document,\n\t\tdisplay = elemdisplay[ nodeName ];\n\n\tif ( !display ) {\n\t\tdisplay = actualDisplay( nodeName, doc );\n\n\t\t// If the simple way fails, read from inside an iframe\n\t\tif ( display === \"none\" || !display ) {\n\n\t\t\t// Use the already-created iframe if possible\n\t\t\tiframe = ( iframe || jQuery( \"<iframe frameborder='0' width='0' height='0'/>\" ) )\n\t\t\t\t.appendTo( doc.documentElement );\n\n\t\t\t// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse\n\t\t\tdoc = iframe[ 0 ].contentDocument;\n\n\t\t\t// Support: IE\n\t\t\tdoc.write();\n\t\t\tdoc.close();\n\n\t\t\tdisplay = actualDisplay( nodeName, doc );\n\t\t\tiframe.detach();\n\t\t}\n\n\t\t// Store the correct default display\n\t\telemdisplay[ nodeName ] = display;\n\t}\n\n\treturn display;\n}\nvar rmargin = ( /^margin/ );\n\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE<=11+, Firefox<=30+ (#15098, #14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback, args ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.apply( elem, args || [] );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar documentElement = document.documentElement;\n\n\n\n( function() {\n\tvar pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE9-11+\n\t// Style of cloned element affects source element cloned (#8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tcontainer.style.cssText = \"border:0;width:8px;height:0;top:0;left:-9999px;\" +\n\t\t\"padding:0;margin-top:1px;position:absolute\";\n\tcontainer.appendChild( div );\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}\n\n\tjQuery.extend( support, {\n\t\tpixelPosition: function() {\n\n\t\t\t// This test is executed only once but we still do memoizing\n\t\t\t// since we can use the boxSizingReliable pre-computing.\n\t\t\t// No need to check if the test was already performed, though.\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\tboxSizingReliable: function() {\n\t\t\tif ( boxSizingReliableVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelMarginRight: function() {\n\n\t\t\t// Support: Android 4.0-4.3\n\t\t\t// We're checking for boxSizingReliableVal here instead of pixelMarginRightVal\n\t\t\t// since that compresses better and they're computed together anyway.\n\t\t\tif ( boxSizingReliableVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn pixelMarginRightVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\n\t\t\t// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37\n\t\t\tif ( boxSizingReliableVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\treliableMarginRight: function() {\n\n\t\t\t// Support: Android 2.3\n\t\t\t// Check if div with explicit width and no margin-right incorrectly\n\t\t\t// gets computed margin-right based on width of container. (#3333)\n\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\t\t\t// This support function is only executed once so no memoizing is needed.\n\t\t\tvar ret,\n\t\t\t\tmarginDiv = div.appendChild( document.createElement( \"div\" ) );\n\n\t\t\t// Reset CSS: box-sizing; display; margin; border; padding\n\t\t\tmarginDiv.style.cssText = div.style.cssText =\n\n\t\t\t\t// Support: Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:content-box;box-sizing:content-box;\" +\n\t\t\t\t\"display:block;margin:0;border:0;padding:0\";\n\t\t\tmarginDiv.style.marginRight = marginDiv.style.width = \"0\";\n\t\t\tdiv.style.width = \"1px\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tret = !parseFloat( window.getComputedStyle( marginDiv ).marginRight );\n\n\t\t\tdocumentElement.removeChild( container );\n\t\t\tdiv.removeChild( marginDiv );\n\n\t\t\treturn ret;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// Support: IE9\n\t// getPropertyValue is only needed for .css('filter') (#12537)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( ret === \"\" && !jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// http://dev.w3.org/csswg/cssom/#resolved-values\n\t\tif ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE9-11+\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t},\n\n\tcssPrefixes = [ \"Webkit\", \"O\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style;\n\n// Return a css property mapped to a potentially vendor prefixed property\nfunction vendorPropName( name ) {\n\n\t// Shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\nfunction setPositiveNumber( elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\n\tvar i = extra === ( isBorderBox ? \"border\" : \"content\" ) ?\n\n\t\t// If we already have the right measurement, avoid augmentation\n\t\t4 :\n\n\t\t// Otherwise initialize for horizontal or vertical properties\n\t\tname === \"width\" ? 1 : 0,\n\n\t\tval = 0;\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin, so add it if we want it\n\t\tif ( extra === \"margin\" ) {\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\tif ( isBorderBox ) {\n\n\t\t\t// border-box includes padding, so remove it if we want content\n\t\t\tif ( extra === \"content\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// At this point, extra isn't border nor margin, so remove border\n\t\t\tif ( extra !== \"margin\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// At this point, extra isn't content, so add padding\n\t\t\tval += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// At this point, extra isn't content nor padding, so add border\n\t\t\tif ( extra !== \"padding\" ) {\n\t\t\t\tval += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn val;\n}\n\nfunction getWidthOrHeight( elem, name, extra ) {\n\n\t// Start with offset property, which is equivalent to the border-box value\n\tvar valueIsBorderBox = true,\n\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\n\t\tstyles = getStyles( elem ),\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t// Support: IE11 only\n\t// In IE 11 fullscreen elements inside of an iframe have\n\t// 100x too small dimensions (gh-1764).\n\tif ( document.msFullscreenElement && window.top !== window ) {\n\n\t\t// Support: IE11 only\n\t\t// Running getBoundingClientRect on a disconnected node\n\t\t// in IE throws an error.\n\t\tif ( elem.getClientRects().length ) {\n\t\t\tval = Math.round( elem.getBoundingClientRect()[ name ] * 100 );\n\t\t}\n\t}\n\n\t// Some non-html elements return undefined for offsetWidth, so check for null/undefined\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\n\tif ( val <= 0 || val == null ) {\n\n\t\t// Fall back to computed then uncomputed css if necessary\n\t\tval = curCSS( elem, name, styles );\n\t\tif ( val < 0 || val == null ) {\n\t\t\tval = elem.style[ name ];\n\t\t}\n\n\t\t// Computed unit is not pixels. Stop here and return.\n\t\tif ( rnumnonpx.test( val ) ) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// Check for style in case a browser which returns unreliable values\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\n\t\tvalueIsBorderBox = isBorderBox &&\n\t\t\t( support.boxSizingReliable() || val === elem.style[ name ] );\n\n\t\t// Normalize \"\", auto, and prepare for extra\n\t\tval = parseFloat( val ) || 0;\n\t}\n\n\t// Use the active box-sizing model to add/subtract irrelevant styles\n\treturn ( val +\n\t\taugmentWidthOrHeight(\n\t\t\telem,\n\t\t\tname,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles\n\t\t)\n\t) + \"px\";\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem, hidden,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvalues[ index ] = dataPriv.get( elem, \"olddisplay\" );\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Reset the inline display of this element to learn if it is\n\t\t\t// being hidden by cascaded rules or not\n\t\t\tif ( !values[ index ] && display === \"none\" ) {\n\t\t\t\telem.style.display = \"\";\n\t\t\t}\n\n\t\t\t// Set elements which have been overridden with display: none\n\t\t\t// in a stylesheet to whatever the default browser style is\n\t\t\t// for such an element\n\t\t\tif ( elem.style.display === \"\" && isHidden( elem ) ) {\n\t\t\t\tvalues[ index ] = dataPriv.access(\n\t\t\t\t\telem,\n\t\t\t\t\t\"olddisplay\",\n\t\t\t\t\tdefaultDisplay( elem.nodeName )\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\thidden = isHidden( elem );\n\n\t\t\tif ( display !== \"none\" || !hidden ) {\n\t\t\t\tdataPriv.set(\n\t\t\t\t\telem,\n\t\t\t\t\t\"olddisplay\",\n\t\t\t\t\thidden ? display : jQuery.css( elem, \"display\" )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of most of the elements in a second loop\n\t// to avoid the constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( !show || elem.style.display === \"none\" || elem.style.display === \"\" ) {\n\t\t\telem.style.display = show ? values[ index ] || \"\" : \"none\";\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {\n\t\t\"float\": \"cssFloat\"\n\t},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = jQuery.camelCase( name ),\n\t\t\tstyle = elem.style;\n\n\t\tname = jQuery.cssProps[ origName ] ||\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (#7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (#7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\tif ( type === \"number\" ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tstyle[ name ] = value;\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = jQuery.camelCase( name );\n\n\t\t// Make sure that we're working with the right name\n\t\tname = jQuery.cssProps[ origName ] ||\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( i, name ) {\n\tjQuery.cssHooks[ name ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\t\t\t\t\telem.offsetWidth === 0 ?\n\t\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = extra && getStyles( elem ),\n\t\t\t\tsubtract = extra && augmentWidthOrHeight(\n\t\t\t\t\telem,\n\t\t\t\t\tname,\n\t\t\t\t\textra,\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\t\tstyles\n\t\t\t\t);\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ name ] = value;\n\t\t\t\tvalue = jQuery.css( elem, name );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// Support: Android 2.3\njQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn swap( elem, { \"display\": \"inline-block\" },\n\t\t\t\tcurCSS, [ elem, \"marginRight\" ] );\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( !rmargin.test( prefix ) ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( jQuery.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t},\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHidden( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 &&\n\t\t\t\t( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||\n\t\t\t\t\tjQuery.cssHooks[ tween.prop ] ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE9\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back Compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, timerId,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = jQuery.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4 ; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\t/* jshint validthis: true */\n\tvar prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHidden( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Handle queue: false promises\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Height/width overflow pass\n\tif ( elem.nodeType === 1 && ( \"height\" in props || \"width\" in props ) ) {\n\n\t\t// Make sure that nothing sneaks out\n\t\t// Record all 3 overflow attributes because IE9-10 do not\n\t\t// change the overflow attribute when overflowX and\n\t\t// overflowY are set to the same value\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Set display property to inline-block for height/width\n\t\t// animations on inline elements that are having width/height animated\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\n\t\t// Test default display if display is currently \"none\"\n\t\tcheckDisplay = display === \"none\" ?\n\t\t\tdataPriv.get( elem, \"olddisplay\" ) || defaultDisplay( elem.nodeName ) : display;\n\n\t\tif ( checkDisplay === \"inline\" && jQuery.css( elem, \"float\" ) === \"none\" ) {\n\t\t\tstyle.display = \"inline-block\";\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// show/hide pass\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.exec( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// If there is dataShow left over from a stopped hide or show\n\t\t\t\t// and we are going to proceed with show, we should pretend to be hidden\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\n\t\t// Any non-fx value stops us from restoring the original display value\n\t\t} else {\n\t\t\tdisplay = undefined;\n\t\t}\n\t}\n\n\tif ( !jQuery.isEmptyObject( orig ) ) {\n\t\tif ( dataShow ) {\n\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\thidden = dataShow.hidden;\n\t\t\t}\n\t\t} else {\n\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", {} );\n\t\t}\n\n\t\t// Store state if its toggle - enables .stop().toggle() to \"reverse\"\n\t\tif ( toggle ) {\n\t\t\tdataShow.hidden = !hidden;\n\t\t}\n\t\tif ( hidden ) {\n\t\t\tjQuery( elem ).show();\n\t\t} else {\n\t\t\tanim.done( function() {\n\t\t\t\tjQuery( elem ).hide();\n\t\t\t} );\n\t\t}\n\t\tanim.done( function() {\n\t\t\tvar prop;\n\n\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t}\n\t\t} );\n\t\tfor ( prop in orig ) {\n\t\t\ttween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\n\t\t\tif ( !( prop in dataShow ) ) {\n\t\t\t\tdataShow[ prop ] = tween.start;\n\t\t\t\tif ( hidden ) {\n\t\t\t\t\ttween.end = tween.start;\n\t\t\t\t\ttween.start = prop === \"width\" || prop === \"height\" ? 1 : 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t// If this is a noop like .hide().hide(), restore an overwritten display value\n\t} else if ( ( display === \"none\" ? defaultDisplay( elem.nodeName ) : display ) === \"inline\" ) {\n\t\tstyle.display = display;\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = jQuery.camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( jQuery.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t} else {\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length ; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( jQuery.isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tjQuery.proxy( result.stop, result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\t// attach callbacks from options\n\treturn animation.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( jQuery.isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnotwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length ; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tjQuery.isFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\n\t};\n\n\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ?\n\t\topt.duration : opt.duration in jQuery.fx.speeds ?\n\t\t\tjQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( jQuery.isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHidden ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue && type !== false ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = jQuery.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Checks the timer has not already been removed\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tif ( timer() ) {\n\t\tjQuery.fx.start();\n\t} else {\n\t\tjQuery.timers.pop();\n\t}\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( !timerId ) {\n\t\ttimerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );\n\t}\n};\n\njQuery.fx.stop = function() {\n\twindow.clearInterval( timerId );\n\n\ttimerId = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\n// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: iOS<=5.1, Android<=4.2+\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE<=11+\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: Android<=2.3\n\t// Options inside disabled selects are incorrectly marked as disabled\n\tselect.disabled = true;\n\tsupport.optDisabled = !opt.disabled;\n\n\t// Support: IE<=11+\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// All attributes are lowercase\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\tname = name.toLowerCase();\n\t\t\thooks = jQuery.attrHooks[ name ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tjQuery.nodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name, propName,\n\t\t\ti = 0,\n\t\t\tattrNames = value && value.match( rnotwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\tpropName = jQuery.propFix[ name ] || name;\n\n\t\t\t\t// Boolean attributes get special treatment (#10870)\n\t\t\t\tif ( jQuery.expr.match.bool.test( name ) ) {\n\n\t\t\t\t\t// Set corresponding property to false\n\t\t\t\t\telem[ propName ] = false;\n\t\t\t\t}\n\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle;\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ name ];\n\t\t\tattrHandle[ name ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tname.toLowerCase() :\n\t\t\t\tnull;\n\t\t\tattrHandle[ name ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\treturn tabindex ?\n\t\t\t\t\tparseInt( tabindex, 10 ) :\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\t\trclickable.test( elem.nodeName ) && elem.href ?\n\t\t\t\t\t\t\t0 :\n\t\t\t\t\t\t\t-1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\nvar rclass = /[\\t\\r\\n\\f]/g;\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof value === \"string\" && value ) {\n\t\t\tclasses = value.match( rnotwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 &&\n\t\t\t\t\t( \" \" + curValue + \" \" ).replace( rclass, \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tif ( typeof value === \"string\" && value ) {\n\t\t\tclasses = value.match( rnotwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 &&\n\t\t\t\t\t( \" \" + curValue + \" \" ).replace( rclass, \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value;\n\n\t\tif ( typeof stateVal === \"boolean\" && type === \"string\" ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar className, i, self, classNames;\n\n\t\t\tif ( type === \"string\" ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\ti = 0;\n\t\t\t\tself = jQuery( this );\n\t\t\t\tclassNames = value.match( rnotwhite ) || [];\n\n\t\t\t\twhile ( ( className = classNames[ i++ ] ) ) {\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + getClass( elem ) + \" \" ).replace( rclass, \" \" )\n\t\t\t\t\t.indexOf( className ) > -1\n\t\t\t) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, isFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\treturn typeof ret === \"string\" ?\n\n\t\t\t\t\t// Handle most common string cases\n\t\t\t\t\tret.replace( rreturn, \"\" ) :\n\n\t\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\t\tret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tisFunction = jQuery.isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( jQuery.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE<11\n\t\t\t\t// option.value not trimmed (#14858)\n\t\t\t\treturn jQuery.trim( elem.value );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\" || index < 0,\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length,\n\t\t\t\t\ti = index < 0 ?\n\t\t\t\t\t\tmax :\n\t\t\t\t\t\tone ? index : 0;\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t( support.optDisabled ?\n\t\t\t\t\t\t\t\t!option.disabled : option.getAttribute( \"disabled\" ) === null ) &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!jQuery.nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( jQuery.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || {} )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\t\t\t\t\telem[ type ]();\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\n\t\t\t\t// Previously, `originalEvent: {}` was set here, so stopPropagation call\n\t\t\t\t// would not be triggered on donor event, since in our own\n\t\t\t\t// jQuery.event.stopPropagation function we had a check for existence of\n\t\t\t\t// originalEvent.stopPropagation method, so, consequently it would be a noop.\n\t\t\t\t//\n\t\t\t\t// But now, this \"simulate\" function is used only for events\n\t\t\t\t// for which stopPropagation() is noop, so there is no need for that anymore.\n\t\t\t\t//\n\t\t\t\t// For the compat branch though, guard for \"click\" and \"submit\"\n\t\t\t\t// events is still used, but was moved to jQuery.event.stopPropagation function\n\t\t\t\t// because `originalEvent` should point to the original event for the constancy\n\t\t\t\t// with other events and for more focused logic\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\n\t\tif ( e.isDefaultPrevented() ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\njQuery.each( ( \"blur focus focusin focusout load resize scroll unload click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup error contextmenu\" ).split( \" \" ),\n\tfunction( i, name ) {\n\n\t// Handle event binding\n\tjQuery.fn[ name ] = function( data, fn ) {\n\t\treturn arguments.length > 0 ?\n\t\t\tthis.on( name, null, data, fn ) :\n\t\t\tthis.trigger( name );\n\t};\n} );\n\njQuery.fn.extend( {\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\n\n\n\nsupport.focusin = \"onfocusin\" in window;\n\n\n// Support: Firefox\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome, Safari\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = jQuery.now();\n\nvar rquery = ( /\\?/ );\n\n\n\n// Support: Android 2.3\n// Workaround failure to string-cast null input\njQuery.parseJSON = function( data ) {\n\treturn JSON.parse( data + \"\" );\n};\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE9\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {\n\t\txml = undefined;\n\t}\n\n\tif ( !xml || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\tjQuery.error( \"Invalid XML: \" + data );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trhash = /#.*$/,\n\trts = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\toriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];\n\n\t\tif ( jQuery.isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": jQuery.parseJSON,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// The jqXHR state\n\t\t\tstate = 0,\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( state === 2 ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match;\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tvar lname = name.toLowerCase();\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\t\t\tfor ( code in map ) {\n\n\t\t\t\t\t\t\t\t// Lazy-add the new callback in a way that preserves old ones\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR ).complete = completeDeferred.add;\n\t\tjqXHR.success = jqXHR.done;\n\t\tjqXHR.error = jqXHR.fail;\n\n\t\t// Remove hash character (#7531: and string promotion)\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" ).replace( rhash, \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().match( rnotwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE8-11+\n\t\t\t// IE throws exception if url is malformed, e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE8-11+\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( state === 2 ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\tcacheURL = s.url;\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// If data is available, append data to url\n\t\t\tif ( s.data ) {\n\t\t\t\tcacheURL = ( s.url += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data );\n\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add anti-cache in url if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\ts.url = rts.test( cacheURL ) ?\n\n\t\t\t\t\t// If there is already a '_' parameter, set its value\n\t\t\t\t\tcacheURL.replace( rts, \"$1_=\" + nonce++ ) :\n\n\t\t\t\t\t// Otherwise add one to the end\n\t\t\t\t\tcacheURL + ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + nonce++;\n\t\t\t}\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\n\t\t\tjqXHR[ i ]( s[ i ] );\n\t\t}\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tstate = 1;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Propagate exception as error if not done\n\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\tdone( -1, e );\n\n\t\t\t\t// Simply rethrow otherwise\n\t\t\t\t} else {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is \"done\" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\n\njQuery._evalUrl = function( url ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (#11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tasync: false,\n\t\tglobal: false,\n\t\t\"throws\": true\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapAll( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( this[ 0 ] ) {\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar isFunction = jQuery.isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function() {\n\t\treturn this.parent().each( function() {\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t\t}\n\t\t} ).end();\n\t}\n} );\n\n\njQuery.expr.filters.hidden = function( elem ) {\n\treturn !jQuery.expr.filters.visible( elem );\n};\njQuery.expr.filters.visible = function( elem ) {\n\n\t// Support: Opera <= 12.12\n\t// Opera reports offsetWidths and offsetHeights less than zero on some elements\n\t// Use OR instead of AND as the element is not visible if either is true\n\t// See tickets #10406 and #13132\n\treturn elem.offsetWidth > 0 || elem.offsetHeight > 0 || elem.getClientRects().length > 0;\n};\n\n\n\n\nvar r20 = /%20/g,\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( jQuery.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, value ) {\n\n\t\t\t// If value is a function, invoke it and return its value\n\t\t\tvalue = jQuery.isFunction( value ) ? value() : ( value == null ? \"\" : value );\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\n\t\t};\n\n\t// Set traditional to true for jQuery <= 1.3.2 behavior.\n\tif ( traditional === undefined ) {\n\t\ttraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" ).replace( r20, \"+\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} )\n\t\t.filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} )\n\t\t.map( function( i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\treturn val == null ?\n\t\t\t\tnull :\n\t\t\t\tjQuery.isArray( val ) ?\n\t\t\t\t\tjQuery.map( val, function( val ) {\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t\t} ) :\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE9\n\t\t// #1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE9\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see #8605, #14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = callback( \"error\" );\n\n\t\t\t\t// Support: IE9\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// #14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain requests\n\tif ( s.crossDomain ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" ).prop( {\n\t\t\t\t\tcharset: s.scriptCharset,\n\t\t\t\t\tsrc: s.url\n\t\t\t\t} ).on(\n\t\t\t\t\t\"load error\",\n\t\t\t\t\tcallback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8+\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\t// Stop scripts or inline event handlers from being executed immediately\n\t// by using document.implementation\n\tcontext = context || ( support.createHTMLDocument ?\n\t\tdocument.implementation.createHTMLDocument( \"\" ) :\n\t\tdocument );\n\n\tvar parsed = rsingleTag.exec( data ),\n\t\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n// Keep a copy of the old load method\nvar _load = jQuery.fn.load;\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tif ( typeof url !== \"string\" && _load ) {\n\t\treturn _load.apply( this, arguments );\n\t}\n\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = jQuery.trim( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( jQuery.isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( self, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.expr.filters.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\n/**\n * Gets a window from an element\n */\nfunction getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( jQuery.isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\toffset: function( options ) {\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar docElem, win,\n\t\t\telem = this[ 0 ],\n\t\t\tbox = { top: 0, left: 0 },\n\t\t\tdoc = elem && elem.ownerDocument;\n\n\t\tif ( !doc ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocElem = doc.documentElement;\n\n\t\t// Make sure it's not a disconnected DOM node\n\t\tif ( !jQuery.contains( docElem, elem ) ) {\n\t\t\treturn box;\n\t\t}\n\n\t\tbox = elem.getBoundingClientRect();\n\t\twin = getWindow( doc );\n\t\treturn {\n\t\t\ttop: box.top + win.pageYOffset - docElem.clientTop,\n\t\t\tleft: box.left + win.pageXOffset - docElem.clientLeft\n\t\t};\n\t},\n\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// Fixed elements are offset from window (parentOffset = {top:0, left: 0},\n\t\t// because it is its only offset parent\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume getBoundingClientRect is there when computed position is fixed\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\n\t\t\t// Get *real* offsetParent\n\t\t\toffsetParent = this.offsetParent();\n\n\t\t\t// Get correct offsets\n\t\t\toffset = this.offset();\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], \"html\" ) ) {\n\t\t\t\tparentOffset = offsetParent.offset();\n\t\t\t}\n\n\t\t\t// Add offsetParent borders\n\t\t\t// Subtract offsetParent scroll positions\n\t\t\tparentOffset.top += jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true ) -\n\t\t\t\toffsetParent.scrollTop();\n\t\t\tparentOffset.left += jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true ) -\n\t\t\t\toffsetParent.scrollLeft();\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\t\t\tvar win = getWindow( elem );\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari<7-8+, Chrome<37-44+\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name },\n\t\tfunction( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there\n\t\t\t\t\t// isn't a whole lot we can do. See pull request at this URL for discussion:\n\t\t\t\t\t// https://github.com/jquery/jquery/pull/764\n\t\t\t\t\treturn elem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable, null );\n\t\t};\n\t} );\n} );\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\tsize: function() {\n\t\treturn this.length;\n\t}\n} );\n\njQuery.fn.andSelf = jQuery.fn.addBack;\n\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (#13566)\nif ( !noGlobal ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\nreturn jQuery;\n}));\n"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/jquery-validation/.bower.json",
    "content": "{\n  \"name\": \"jquery-validation\",\n  \"homepage\": \"http://jqueryvalidation.org/\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git://github.com/jzaefferer/jquery-validation.git\"\n  },\n  \"authors\": [\n    \"Jörn Zaefferer <joern.zaefferer@gmail.com>\"\n  ],\n  \"description\": \"Form validation made easy\",\n  \"main\": \"dist/jquery.validate.js\",\n  \"keywords\": [\n    \"forms\",\n    \"validation\",\n    \"validate\"\n  ],\n  \"license\": \"MIT\",\n  \"ignore\": [\n    \"**/.*\",\n    \"node_modules\",\n    \"bower_components\",\n    \"test\",\n    \"demo\",\n    \"lib\"\n  ],\n  \"dependencies\": {\n    \"jquery\": \">= 1.7.2\"\n  },\n  \"version\": \"1.14.0\",\n  \"_release\": \"1.14.0\",\n  \"_resolution\": {\n    \"type\": \"version\",\n    \"tag\": \"1.14.0\",\n    \"commit\": \"c1343fb9823392aa9acbe1c3ffd337b8c92fed48\"\n  },\n  \"_source\": \"git://github.com/jzaefferer/jquery-validation.git\",\n  \"_target\": \">=1.8\",\n  \"_originalSource\": \"jquery-validation\"\n}"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/jquery-validation/LICENSE.md",
    "content": "The MIT License (MIT)\n=====================\n\nCopyright Jörn Zaefferer\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/jquery-validation/dist/additional-methods.js",
    "content": "/*!\n * jQuery Validation Plugin v1.14.0\n *\n * http://jqueryvalidation.org/\n *\n * Copyright (c) 2015 Jörn Zaefferer\n * Released under the MIT license\n */\n(function( factory ) {\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\tdefine( [\"jquery\", \"./jquery.validate\"], factory );\n\t} else {\n\t\tfactory( jQuery );\n\t}\n}(function( $ ) {\n\n(function() {\n\n\tfunction stripHtml(value) {\n\t\t// remove html tags and space chars\n\t\treturn value.replace(/<.[^<>]*?>/g, \" \").replace(/&nbsp;|&#160;/gi, \" \")\n\t\t// remove punctuation\n\t\t.replace(/[.(),;:!?%#$'\\\"_+=\\/\\-“”’]*/g, \"\");\n\t}\n\n\t$.validator.addMethod(\"maxWords\", function(value, element, params) {\n\t\treturn this.optional(element) || stripHtml(value).match(/\\b\\w+\\b/g).length <= params;\n\t}, $.validator.format(\"Please enter {0} words or less.\"));\n\n\t$.validator.addMethod(\"minWords\", function(value, element, params) {\n\t\treturn this.optional(element) || stripHtml(value).match(/\\b\\w+\\b/g).length >= params;\n\t}, $.validator.format(\"Please enter at least {0} words.\"));\n\n\t$.validator.addMethod(\"rangeWords\", function(value, element, params) {\n\t\tvar valueStripped = stripHtml(value),\n\t\t\tregex = /\\b\\w+\\b/g;\n\t\treturn this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];\n\t}, $.validator.format(\"Please enter between {0} and {1} words.\"));\n\n}());\n\n// Accept a value from a file input based on a required mimetype\n$.validator.addMethod(\"accept\", function(value, element, param) {\n\t// Split mime on commas in case we have multiple types we can accept\n\tvar typeParam = typeof param === \"string\" ? param.replace(/\\s/g, \"\").replace(/,/g, \"|\") : \"image/*\",\n\toptionalValue = this.optional(element),\n\ti, file;\n\n\t// Element is optional\n\tif (optionalValue) {\n\t\treturn optionalValue;\n\t}\n\n\tif ($(element).attr(\"type\") === \"file\") {\n\t\t// If we are using a wildcard, make it regex friendly\n\t\ttypeParam = typeParam.replace(/\\*/g, \".*\");\n\n\t\t// Check if the element has a FileList before checking each file\n\t\tif (element.files && element.files.length) {\n\t\t\tfor (i = 0; i < element.files.length; i++) {\n\t\t\t\tfile = element.files[i];\n\n\t\t\t\t// Grab the mimetype from the loaded file, verify it matches\n\t\t\t\tif (!file.type.match(new RegExp( \"\\\\.?(\" + typeParam + \")$\", \"i\"))) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Either return true because we've validated each file, or because the\n\t// browser does not support element.files and the FileList feature\n\treturn true;\n}, $.validator.format(\"Please enter a value with a valid mimetype.\"));\n\n$.validator.addMethod(\"alphanumeric\", function(value, element) {\n\treturn this.optional(element) || /^\\w+$/i.test(value);\n}, \"Letters, numbers, and underscores only please\");\n\n/*\n * Dutch bank account numbers (not 'giro' numbers) have 9 digits\n * and pass the '11 check'.\n * We accept the notation with spaces, as that is common.\n * acceptable: 123456789 or 12 34 56 789\n */\n$.validator.addMethod(\"bankaccountNL\", function(value, element) {\n\tif (this.optional(element)) {\n\t\treturn true;\n\t}\n\tif (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {\n\t\treturn false;\n\t}\n\t// now '11 check'\n\tvar account = value.replace(/ /g, \"\"), // remove spaces\n\t\tsum = 0,\n\t\tlen = account.length,\n\t\tpos, factor, digit;\n\tfor ( pos = 0; pos < len; pos++ ) {\n\t\tfactor = len - pos;\n\t\tdigit = account.substring(pos, pos + 1);\n\t\tsum = sum + factor * digit;\n\t}\n\treturn sum % 11 === 0;\n}, \"Please specify a valid bank account number\");\n\n$.validator.addMethod(\"bankorgiroaccountNL\", function(value, element) {\n\treturn this.optional(element) ||\n\t\t\t($.validator.methods.bankaccountNL.call(this, value, element)) ||\n\t\t\t($.validator.methods.giroaccountNL.call(this, value, element));\n}, \"Please specify a valid bank or giro account number\");\n\n/**\n * BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.\n *\n * BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)\n *\n * BIC definition in detail:\n * - First 4 characters - bank code (only letters)\n * - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)\n * - Next 2 characters - location code (letters and digits)\n *   a. shall not start with '0' or '1'\n *   b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)\n * - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)\n */\n$.validator.addMethod(\"bic\", function(value, element) {\n    return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );\n}, \"Please specify a valid BIC code\");\n\n/*\n * Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities\n * Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal\n */\n$.validator.addMethod( \"cifES\", function( value ) {\n\t\"use strict\";\n\n\tvar num = [],\n\t\tcontrolDigit, sum, i, count, tmp, secondDigit;\n\n\tvalue = value.toUpperCase();\n\n\t// Quick format test\n\tif ( !value.match( \"((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)\" ) ) {\n\t\treturn false;\n\t}\n\n\tfor ( i = 0; i < 9; i++ ) {\n\t\tnum[ i ] = parseInt( value.charAt( i ), 10 );\n\t}\n\n\t// Algorithm for checking CIF codes\n\tsum = num[ 2 ] + num[ 4 ] + num[ 6 ];\n\tfor ( count = 1; count < 8; count += 2 ) {\n\t\ttmp = ( 2 * num[ count ] ).toString();\n\t\tsecondDigit = tmp.charAt( 1 );\n\n\t\tsum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === \"\" ? 0 : parseInt( secondDigit, 10 ) );\n\t}\n\n\t/* The first (position 1) is a letter following the following criteria:\n\t *\tA. Corporations\n\t *\tB. LLCs\n\t *\tC. General partnerships\n\t *\tD. Companies limited partnerships\n\t *\tE. Communities of goods\n\t *\tF. Cooperative Societies\n\t *\tG. Associations\n\t *\tH. Communities of homeowners in horizontal property regime\n\t *\tJ. Civil Societies\n\t *\tK. Old format\n\t *\tL. Old format\n\t *\tM. Old format\n\t *\tN. Nonresident entities\n\t *\tP. Local authorities\n\t *\tQ. Autonomous bodies, state or not, and the like, and congregations and religious institutions\n\t *\tR. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)\n\t *\tS. Organs of State Administration and regions\n\t *\tV. Agrarian Transformation\n\t *\tW. Permanent establishments of non-resident in Spain\n\t */\n\tif ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {\n\t\tsum += \"\";\n\t\tcontrolDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );\n\t\tvalue += controlDigit;\n\t\treturn ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );\n\t}\n\n\treturn false;\n\n}, \"Please specify a valid CIF number.\" );\n\n/*\n * Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.\n * CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.\n */\n$.validator.addMethod(\"cpfBR\", function(value) {\n\t// Removing special characters from value\n\tvalue = value.replace(/([~!@#$%^&*()_+=`{}\\[\\]\\-|\\\\:;'<>,.\\/? ])+/g, \"\");\n\n\t// Checking value to have 11 digits only\n\tif (value.length !== 11) {\n\t\treturn false;\n\t}\n\n\tvar sum = 0,\n\t\tfirstCN, secondCN, checkResult, i;\n\n\tfirstCN = parseInt(value.substring(9, 10), 10);\n\tsecondCN = parseInt(value.substring(10, 11), 10);\n\n\tcheckResult = function(sum, cn) {\n\t\tvar result = (sum * 10) % 11;\n\t\tif ((result === 10) || (result === 11)) {result = 0;}\n\t\treturn (result === cn);\n\t};\n\n\t// Checking for dump data\n\tif (value === \"\" ||\n\t\tvalue === \"00000000000\" ||\n\t\tvalue === \"11111111111\" ||\n\t\tvalue === \"22222222222\" ||\n\t\tvalue === \"33333333333\" ||\n\t\tvalue === \"44444444444\" ||\n\t\tvalue === \"55555555555\" ||\n\t\tvalue === \"66666666666\" ||\n\t\tvalue === \"77777777777\" ||\n\t\tvalue === \"88888888888\" ||\n\t\tvalue === \"99999999999\"\n\t) {\n\t\treturn false;\n\t}\n\n\t// Step 1 - using first Check Number:\n\tfor ( i = 1; i <= 9; i++ ) {\n\t\tsum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i);\n\t}\n\n\t// If first Check Number (CN) is valid, move to Step 2 - using second Check Number:\n\tif ( checkResult(sum, firstCN) ) {\n\t\tsum = 0;\n\t\tfor ( i = 1; i <= 10; i++ ) {\n\t\t\tsum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i);\n\t\t}\n\t\treturn checkResult(sum, secondCN);\n\t}\n\treturn false;\n\n}, \"Please specify a valid CPF number\");\n\n/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator\n * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0\n * Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)\n */\n$.validator.addMethod(\"creditcardtypes\", function(value, element, param) {\n\tif (/[^0-9\\-]+/.test(value)) {\n\t\treturn false;\n\t}\n\n\tvalue = value.replace(/\\D/g, \"\");\n\n\tvar validTypes = 0x0000;\n\n\tif (param.mastercard) {\n\t\tvalidTypes |= 0x0001;\n\t}\n\tif (param.visa) {\n\t\tvalidTypes |= 0x0002;\n\t}\n\tif (param.amex) {\n\t\tvalidTypes |= 0x0004;\n\t}\n\tif (param.dinersclub) {\n\t\tvalidTypes |= 0x0008;\n\t}\n\tif (param.enroute) {\n\t\tvalidTypes |= 0x0010;\n\t}\n\tif (param.discover) {\n\t\tvalidTypes |= 0x0020;\n\t}\n\tif (param.jcb) {\n\t\tvalidTypes |= 0x0040;\n\t}\n\tif (param.unknown) {\n\t\tvalidTypes |= 0x0080;\n\t}\n\tif (param.all) {\n\t\tvalidTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;\n\t}\n\tif (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard\n\t\treturn value.length === 16;\n\t}\n\tif (validTypes & 0x0002 && /^(4)/.test(value)) { //visa\n\t\treturn value.length === 16;\n\t}\n\tif (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex\n\t\treturn value.length === 15;\n\t}\n\tif (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub\n\t\treturn value.length === 14;\n\t}\n\tif (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute\n\t\treturn value.length === 15;\n\t}\n\tif (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover\n\t\treturn value.length === 16;\n\t}\n\tif (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb\n\t\treturn value.length === 16;\n\t}\n\tif (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb\n\t\treturn value.length === 15;\n\t}\n\tif (validTypes & 0x0080) { //unknown\n\t\treturn true;\n\t}\n\treturn false;\n}, \"Please enter a valid credit card number.\");\n\n/**\n * Validates currencies with any given symbols by @jameslouiz\n * Symbols can be optional or required. Symbols required by default\n *\n * Usage examples:\n *  currency: [\"£\", false] - Use false for soft currency validation\n *  currency: [\"$\", false]\n *  currency: [\"RM\", false] - also works with text based symbols such as \"RM\" - Malaysia Ringgit etc\n *\n *  <input class=\"currencyInput\" name=\"currencyInput\">\n *\n * Soft symbol checking\n *  currencyInput: {\n *     currency: [\"$\", false]\n *  }\n *\n * Strict symbol checking (default)\n *  currencyInput: {\n *     currency: \"$\"\n *     //OR\n *     currency: [\"$\", true]\n *  }\n *\n * Multiple Symbols\n *  currencyInput: {\n *     currency: \"$,£,¢\"\n *  }\n */\n$.validator.addMethod(\"currency\", function(value, element, param) {\n    var isParamString = typeof param === \"string\",\n        symbol = isParamString ? param : param[0],\n        soft = isParamString ? true : param[1],\n        regex;\n\n    symbol = symbol.replace(/,/g, \"\");\n    symbol = soft ? symbol + \"]\" : symbol + \"]?\";\n    regex = \"^[\" + symbol + \"([1-9]{1}[0-9]{0,2}(\\\\,[0-9]{3})*(\\\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\\\.[0-9]{0,2})?|0(\\\\.[0-9]{0,2})?|(\\\\.[0-9]{1,2})?)$\";\n    regex = new RegExp(regex);\n    return this.optional(element) || regex.test(value);\n\n}, \"Please specify a valid currency\");\n\n$.validator.addMethod(\"dateFA\", function(value, element) {\n\treturn this.optional(element) || /^[1-4]\\d{3}\\/((0?[1-6]\\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);\n}, $.validator.messages.date);\n\n/**\n * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.\n *\n * @example $.validator.methods.date(\"01/01/1900\")\n * @result true\n *\n * @example $.validator.methods.date(\"01/13/1990\")\n * @result false\n *\n * @example $.validator.methods.date(\"01.01.1900\")\n * @result false\n *\n * @example <input name=\"pippo\" class=\"{dateITA:true}\" />\n * @desc Declares an optional input element whose value must be a valid date.\n *\n * @name $.validator.methods.dateITA\n * @type Boolean\n * @cat Plugins/Validate/Methods\n */\n$.validator.addMethod(\"dateITA\", function(value, element) {\n\tvar check = false,\n\t\tre = /^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$/,\n\t\tadata, gg, mm, aaaa, xdata;\n\tif ( re.test(value)) {\n\t\tadata = value.split(\"/\");\n\t\tgg = parseInt(adata[0], 10);\n\t\tmm = parseInt(adata[1], 10);\n\t\taaaa = parseInt(adata[2], 10);\n\t\txdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0));\n\t\tif ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {\n\t\t\tcheck = true;\n\t\t} else {\n\t\t\tcheck = false;\n\t\t}\n\t} else {\n\t\tcheck = false;\n\t}\n\treturn this.optional(element) || check;\n}, $.validator.messages.date);\n\n$.validator.addMethod(\"dateNL\", function(value, element) {\n\treturn this.optional(element) || /^(0?[1-9]|[12]\\d|3[01])[\\.\\/\\-](0?[1-9]|1[012])[\\.\\/\\-]([12]\\d)?(\\d\\d)$/.test(value);\n}, $.validator.messages.date);\n\n// Older \"accept\" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept\n$.validator.addMethod(\"extension\", function(value, element, param) {\n\tparam = typeof param === \"string\" ? param.replace(/,/g, \"|\") : \"png|jpe?g|gif\";\n\treturn this.optional(element) || value.match(new RegExp(\"\\\\.(\" + param + \")$\", \"i\"));\n}, $.validator.format(\"Please enter a value with a valid extension.\"));\n\n/**\n * Dutch giro account numbers (not bank numbers) have max 7 digits\n */\n$.validator.addMethod(\"giroaccountNL\", function(value, element) {\n\treturn this.optional(element) || /^[0-9]{1,7}$/.test(value);\n}, \"Please specify a valid giro account number\");\n\n/**\n * IBAN is the international bank account number.\n * It has a country - specific format, that is checked here too\n */\n$.validator.addMethod(\"iban\", function(value, element) {\n\t// some quick simple tests to prevent needless work\n\tif (this.optional(element)) {\n\t\treturn true;\n\t}\n\n\t// remove spaces and to upper case\n\tvar iban = value.replace(/ /g, \"\").toUpperCase(),\n\t\tibancheckdigits = \"\",\n\t\tleadingZeroes = true,\n\t\tcRest = \"\",\n\t\tcOperator = \"\",\n\t\tcountrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;\n\n\t// check the country code and find the country specific format\n\tcountrycode = iban.substring(0, 2);\n\tbbancountrypatterns = {\n\t\t\"AL\": \"\\\\d{8}[\\\\dA-Z]{16}\",\n\t\t\"AD\": \"\\\\d{8}[\\\\dA-Z]{12}\",\n\t\t\"AT\": \"\\\\d{16}\",\n\t\t\"AZ\": \"[\\\\dA-Z]{4}\\\\d{20}\",\n\t\t\"BE\": \"\\\\d{12}\",\n\t\t\"BH\": \"[A-Z]{4}[\\\\dA-Z]{14}\",\n\t\t\"BA\": \"\\\\d{16}\",\n\t\t\"BR\": \"\\\\d{23}[A-Z][\\\\dA-Z]\",\n\t\t\"BG\": \"[A-Z]{4}\\\\d{6}[\\\\dA-Z]{8}\",\n\t\t\"CR\": \"\\\\d{17}\",\n\t\t\"HR\": \"\\\\d{17}\",\n\t\t\"CY\": \"\\\\d{8}[\\\\dA-Z]{16}\",\n\t\t\"CZ\": \"\\\\d{20}\",\n\t\t\"DK\": \"\\\\d{14}\",\n\t\t\"DO\": \"[A-Z]{4}\\\\d{20}\",\n\t\t\"EE\": \"\\\\d{16}\",\n\t\t\"FO\": \"\\\\d{14}\",\n\t\t\"FI\": \"\\\\d{14}\",\n\t\t\"FR\": \"\\\\d{10}[\\\\dA-Z]{11}\\\\d{2}\",\n\t\t\"GE\": \"[\\\\dA-Z]{2}\\\\d{16}\",\n\t\t\"DE\": \"\\\\d{18}\",\n\t\t\"GI\": \"[A-Z]{4}[\\\\dA-Z]{15}\",\n\t\t\"GR\": \"\\\\d{7}[\\\\dA-Z]{16}\",\n\t\t\"GL\": \"\\\\d{14}\",\n\t\t\"GT\": \"[\\\\dA-Z]{4}[\\\\dA-Z]{20}\",\n\t\t\"HU\": \"\\\\d{24}\",\n\t\t\"IS\": \"\\\\d{22}\",\n\t\t\"IE\": \"[\\\\dA-Z]{4}\\\\d{14}\",\n\t\t\"IL\": \"\\\\d{19}\",\n\t\t\"IT\": \"[A-Z]\\\\d{10}[\\\\dA-Z]{12}\",\n\t\t\"KZ\": \"\\\\d{3}[\\\\dA-Z]{13}\",\n\t\t\"KW\": \"[A-Z]{4}[\\\\dA-Z]{22}\",\n\t\t\"LV\": \"[A-Z]{4}[\\\\dA-Z]{13}\",\n\t\t\"LB\": \"\\\\d{4}[\\\\dA-Z]{20}\",\n\t\t\"LI\": \"\\\\d{5}[\\\\dA-Z]{12}\",\n\t\t\"LT\": \"\\\\d{16}\",\n\t\t\"LU\": \"\\\\d{3}[\\\\dA-Z]{13}\",\n\t\t\"MK\": \"\\\\d{3}[\\\\dA-Z]{10}\\\\d{2}\",\n\t\t\"MT\": \"[A-Z]{4}\\\\d{5}[\\\\dA-Z]{18}\",\n\t\t\"MR\": \"\\\\d{23}\",\n\t\t\"MU\": \"[A-Z]{4}\\\\d{19}[A-Z]{3}\",\n\t\t\"MC\": \"\\\\d{10}[\\\\dA-Z]{11}\\\\d{2}\",\n\t\t\"MD\": \"[\\\\dA-Z]{2}\\\\d{18}\",\n\t\t\"ME\": \"\\\\d{18}\",\n\t\t\"NL\": \"[A-Z]{4}\\\\d{10}\",\n\t\t\"NO\": \"\\\\d{11}\",\n\t\t\"PK\": \"[\\\\dA-Z]{4}\\\\d{16}\",\n\t\t\"PS\": \"[\\\\dA-Z]{4}\\\\d{21}\",\n\t\t\"PL\": \"\\\\d{24}\",\n\t\t\"PT\": \"\\\\d{21}\",\n\t\t\"RO\": \"[A-Z]{4}[\\\\dA-Z]{16}\",\n\t\t\"SM\": \"[A-Z]\\\\d{10}[\\\\dA-Z]{12}\",\n\t\t\"SA\": \"\\\\d{2}[\\\\dA-Z]{18}\",\n\t\t\"RS\": \"\\\\d{18}\",\n\t\t\"SK\": \"\\\\d{20}\",\n\t\t\"SI\": \"\\\\d{15}\",\n\t\t\"ES\": \"\\\\d{20}\",\n\t\t\"SE\": \"\\\\d{20}\",\n\t\t\"CH\": \"\\\\d{5}[\\\\dA-Z]{12}\",\n\t\t\"TN\": \"\\\\d{20}\",\n\t\t\"TR\": \"\\\\d{5}[\\\\dA-Z]{17}\",\n\t\t\"AE\": \"\\\\d{3}\\\\d{16}\",\n\t\t\"GB\": \"[A-Z]{4}\\\\d{14}\",\n\t\t\"VG\": \"[\\\\dA-Z]{4}\\\\d{16}\"\n\t};\n\n\tbbanpattern = bbancountrypatterns[countrycode];\n\t// As new countries will start using IBAN in the\n\t// future, we only check if the countrycode is known.\n\t// This prevents false negatives, while almost all\n\t// false positives introduced by this, will be caught\n\t// by the checksum validation below anyway.\n\t// Strict checking should return FALSE for unknown\n\t// countries.\n\tif (typeof bbanpattern !== \"undefined\") {\n\t\tibanregexp = new RegExp(\"^[A-Z]{2}\\\\d{2}\" + bbanpattern + \"$\", \"\");\n\t\tif (!(ibanregexp.test(iban))) {\n\t\t\treturn false; // invalid country specific format\n\t\t}\n\t}\n\n\t// now check the checksum, first convert to digits\n\tibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);\n\tfor (i = 0; i < ibancheck.length; i++) {\n\t\tcharAt = ibancheck.charAt(i);\n\t\tif (charAt !== \"0\") {\n\t\t\tleadingZeroes = false;\n\t\t}\n\t\tif (!leadingZeroes) {\n\t\t\tibancheckdigits += \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\".indexOf(charAt);\n\t\t}\n\t}\n\n\t// calculate the result of: ibancheckdigits % 97\n\tfor (p = 0; p < ibancheckdigits.length; p++) {\n\t\tcChar = ibancheckdigits.charAt(p);\n\t\tcOperator = \"\" + cRest + \"\" + cChar;\n\t\tcRest = cOperator % 97;\n\t}\n\treturn cRest === 1;\n}, \"Please specify a valid IBAN\");\n\n$.validator.addMethod(\"integer\", function(value, element) {\n\treturn this.optional(element) || /^-?\\d+$/.test(value);\n}, \"A positive or negative non-decimal number please\");\n\n$.validator.addMethod(\"ipv4\", function(value, element) {\n\treturn this.optional(element) || /^(25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.(25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.(25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.(25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/i.test(value);\n}, \"Please enter a valid IP v4 address.\");\n\n$.validator.addMethod(\"ipv6\", function(value, element) {\n\treturn this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\d{1,2}))\\b)\\.){3}(\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\d{1,2}))\\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\d{1,2}))\\b)\\.){3}(\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\d{1,2}))\\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\d{1,2}))\\b)\\.){3}(\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\d{1,2}))\\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);\n}, \"Please enter a valid IP v6 address.\");\n\n$.validator.addMethod(\"lettersonly\", function(value, element) {\n\treturn this.optional(element) || /^[a-z]+$/i.test(value);\n}, \"Letters only please\");\n\n$.validator.addMethod(\"letterswithbasicpunc\", function(value, element) {\n\treturn this.optional(element) || /^[a-z\\-.,()'\"\\s]+$/i.test(value);\n}, \"Letters or punctuation only please\");\n\n$.validator.addMethod(\"mobileNL\", function(value, element) {\n\treturn this.optional(element) || /^((\\+|00(\\s|\\s?\\-\\s?)?)31(\\s|\\s?\\-\\s?)?(\\(0\\)[\\-\\s]?)?|0)6((\\s|\\s?\\-\\s?)?[0-9]){8}$/.test(value);\n}, \"Please specify a valid mobile number\");\n\n/* For UK phone functions, do the following server side processing:\n * Compare original input with this RegEx pattern:\n * ^\\(?(?:(?:00\\)?[\\s\\-]?\\(?|\\+)(44)\\)?[\\s\\-]?\\(?(?:0\\)?[\\s\\-]?\\(?)?|0)([1-9]\\d{1,4}\\)?[\\s\\d\\-]+)$\n * Extract $1 and set $prefix to '+44<space>' if $1 is '44', otherwise set $prefix to '0'\n * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.\n * A number of very detailed GB telephone number RegEx patterns can also be found at:\n * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers\n */\n$.validator.addMethod(\"mobileUK\", function(phone_number, element) {\n\tphone_number = phone_number.replace(/\\(|\\)|\\s+|-/g, \"\");\n\treturn this.optional(element) || phone_number.length > 9 &&\n\t\tphone_number.match(/^(?:(?:(?:00\\s?|\\+)44\\s?|0)7(?:[1345789]\\d{2}|624)\\s?\\d{3}\\s?\\d{3})$/);\n}, \"Please specify a valid mobile number\");\n\n/*\n * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain\n */\n$.validator.addMethod( \"nieES\", function( value ) {\n\t\"use strict\";\n\n\tvalue = value.toUpperCase();\n\n\t// Basic format test\n\tif ( !value.match( \"((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)\" ) ) {\n\t\treturn false;\n\t}\n\n\t// Test NIE\n\t//T\n\tif ( /^[T]{1}/.test( value ) ) {\n\t\treturn ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );\n\t}\n\n\t//XYZ\n\tif ( /^[XYZ]{1}/.test( value ) ) {\n\t\treturn (\n\t\t\tvalue[ 8 ] === \"TRWAGMYFPDXBNJZSQVHLCKE\".charAt(\n\t\t\t\tvalue.replace( \"X\", \"0\" )\n\t\t\t\t\t.replace( \"Y\", \"1\" )\n\t\t\t\t\t.replace( \"Z\", \"2\" )\n\t\t\t\t\t.substring( 0, 8 ) % 23\n\t\t\t)\n\t\t);\n\t}\n\n\treturn false;\n\n}, \"Please specify a valid NIE number.\" );\n\n/*\n * The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals\n */\n$.validator.addMethod( \"nifES\", function( value ) {\n\t\"use strict\";\n\n\tvalue = value.toUpperCase();\n\n\t// Basic format test\n\tif ( !value.match(\"((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)\") ) {\n\t\treturn false;\n\t}\n\n\t// Test NIF\n\tif ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {\n\t\treturn ( \"TRWAGMYFPDXBNJZSQVHLCKE\".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );\n\t}\n\t// Test specials NIF (starts with K, L or M)\n\tif ( /^[KLM]{1}/.test( value ) ) {\n\t\treturn ( value[ 8 ] === String.fromCharCode( 64 ) );\n\t}\n\n\treturn false;\n\n}, \"Please specify a valid NIF number.\" );\n\njQuery.validator.addMethod( \"notEqualTo\", function( value, element, param ) {\n\treturn this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param );\n}, \"Please enter a different value, values must not be the same.\" );\n\n$.validator.addMethod(\"nowhitespace\", function(value, element) {\n\treturn this.optional(element) || /^\\S+$/i.test(value);\n}, \"No white space please\");\n\n/**\n* Return true if the field value matches the given format RegExp\n*\n* @example $.validator.methods.pattern(\"AR1004\",element,/^AR\\d{4}$/)\n* @result true\n*\n* @example $.validator.methods.pattern(\"BR1004\",element,/^AR\\d{4}$/)\n* @result false\n*\n* @name $.validator.methods.pattern\n* @type Boolean\n* @cat Plugins/Validate/Methods\n*/\n$.validator.addMethod(\"pattern\", function(value, element, param) {\n\tif (this.optional(element)) {\n\t\treturn true;\n\t}\n\tif (typeof param === \"string\") {\n\t\tparam = new RegExp(\"^(?:\" + param + \")$\");\n\t}\n\treturn param.test(value);\n}, \"Invalid format.\");\n\n/**\n * Dutch phone numbers have 10 digits (or 11 and start with +31).\n */\n$.validator.addMethod(\"phoneNL\", function(value, element) {\n\treturn this.optional(element) || /^((\\+|00(\\s|\\s?\\-\\s?)?)31(\\s|\\s?\\-\\s?)?(\\(0\\)[\\-\\s]?)?|0)[1-9]((\\s|\\s?\\-\\s?)?[0-9]){8}$/.test(value);\n}, \"Please specify a valid phone number.\");\n\n/* For UK phone functions, do the following server side processing:\n * Compare original input with this RegEx pattern:\n * ^\\(?(?:(?:00\\)?[\\s\\-]?\\(?|\\+)(44)\\)?[\\s\\-]?\\(?(?:0\\)?[\\s\\-]?\\(?)?|0)([1-9]\\d{1,4}\\)?[\\s\\d\\-]+)$\n * Extract $1 and set $prefix to '+44<space>' if $1 is '44', otherwise set $prefix to '0'\n * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.\n * A number of very detailed GB telephone number RegEx patterns can also be found at:\n * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers\n */\n$.validator.addMethod(\"phoneUK\", function(phone_number, element) {\n\tphone_number = phone_number.replace(/\\(|\\)|\\s+|-/g, \"\");\n\treturn this.optional(element) || phone_number.length > 9 &&\n\t\tphone_number.match(/^(?:(?:(?:00\\s?|\\+)44\\s?)|(?:\\(?0))(?:\\d{2}\\)?\\s?\\d{4}\\s?\\d{4}|\\d{3}\\)?\\s?\\d{3}\\s?\\d{3,4}|\\d{4}\\)?\\s?(?:\\d{5}|\\d{3}\\s?\\d{3})|\\d{5}\\)?\\s?\\d{4,5})$/);\n}, \"Please specify a valid phone number\");\n\n/**\n * matches US phone number format\n *\n * where the area code may not start with 1 and the prefix may not start with 1\n * allows '-' or ' ' as a separator and allows parens around area code\n * some people may want to put a '1' in front of their number\n *\n * 1(212)-999-2345 or\n * 212 999 2344 or\n * 212-999-0983\n *\n * but not\n * 111-123-5434\n * and not\n * 212 123 4567\n */\n$.validator.addMethod(\"phoneUS\", function(phone_number, element) {\n\tphone_number = phone_number.replace(/\\s+/g, \"\");\n\treturn this.optional(element) || phone_number.length > 9 &&\n\t\tphone_number.match(/^(\\+?1-?)?(\\([2-9]([02-9]\\d|1[02-9])\\)|[2-9]([02-9]\\d|1[02-9]))-?[2-9]([02-9]\\d|1[02-9])-?\\d{4}$/);\n}, \"Please specify a valid phone number\");\n\n/* For UK phone functions, do the following server side processing:\n * Compare original input with this RegEx pattern:\n * ^\\(?(?:(?:00\\)?[\\s\\-]?\\(?|\\+)(44)\\)?[\\s\\-]?\\(?(?:0\\)?[\\s\\-]?\\(?)?|0)([1-9]\\d{1,4}\\)?[\\s\\d\\-]+)$\n * Extract $1 and set $prefix to '+44<space>' if $1 is '44', otherwise set $prefix to '0'\n * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.\n * A number of very detailed GB telephone number RegEx patterns can also be found at:\n * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers\n */\n//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers\n$.validator.addMethod(\"phonesUK\", function(phone_number, element) {\n\tphone_number = phone_number.replace(/\\(|\\)|\\s+|-/g, \"\");\n\treturn this.optional(element) || phone_number.length > 9 &&\n\t\tphone_number.match(/^(?:(?:(?:00\\s?|\\+)44\\s?|0)(?:1\\d{8,9}|[23]\\d{9}|7(?:[1345789]\\d{8}|624\\d{6})))$/);\n}, \"Please specify a valid uk phone number\");\n\n/**\n * Matches a valid Canadian Postal Code\n *\n * @example jQuery.validator.methods.postalCodeCA( \"H0H 0H0\", element )\n * @result true\n *\n * @example jQuery.validator.methods.postalCodeCA( \"H0H0H0\", element )\n * @result false\n *\n * @name jQuery.validator.methods.postalCodeCA\n * @type Boolean\n * @cat Plugins/Validate/Methods\n */\n$.validator.addMethod( \"postalCodeCA\", function( value, element ) {\n\treturn this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\\d[A-Z] \\d[A-Z]\\d$/.test( value );\n}, \"Please specify a valid postal code\" );\n\n/*\n* Valida CEPs do brasileiros:\n*\n* Formatos aceitos:\n* 99999-999\n* 99.999-999\n* 99999999\n*/\n$.validator.addMethod(\"postalcodeBR\", function(cep_value, element) {\n\treturn this.optional(element) || /^\\d{2}.\\d{3}-\\d{3}?$|^\\d{5}-?\\d{3}?$/.test( cep_value );\n}, \"Informe um CEP válido.\");\n\n/* Matches Italian postcode (CAP) */\n$.validator.addMethod(\"postalcodeIT\", function(value, element) {\n\treturn this.optional(element) || /^\\d{5}$/.test(value);\n}, \"Please specify a valid postal code\");\n\n$.validator.addMethod(\"postalcodeNL\", function(value, element) {\n\treturn this.optional(element) || /^[1-9][0-9]{3}\\s?[a-zA-Z]{2}$/.test(value);\n}, \"Please specify a valid postal code\");\n\n// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)\n$.validator.addMethod(\"postcodeUK\", function(value, element) {\n\treturn this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\\s?(0AA))$/i.test(value);\n}, \"Please specify a valid UK postcode\");\n\n/*\n * Lets you say \"at least X inputs that match selector Y must be filled.\"\n *\n * The end result is that neither of these inputs:\n *\n *\t<input class=\"productinfo\" name=\"partnumber\">\n *\t<input class=\"productinfo\" name=\"description\">\n *\n *\t...will validate unless at least one of them is filled.\n *\n * partnumber:\t{require_from_group: [1,\".productinfo\"]},\n * description: {require_from_group: [1,\".productinfo\"]}\n *\n * options[0]: number of fields that must be filled in the group\n * options[1]: CSS selector that defines the group of conditionally required fields\n */\n$.validator.addMethod(\"require_from_group\", function(value, element, options) {\n\tvar $fields = $(options[1], element.form),\n\t\t$fieldsFirst = $fields.eq(0),\n\t\tvalidator = $fieldsFirst.data(\"valid_req_grp\") ? $fieldsFirst.data(\"valid_req_grp\") : $.extend({}, this),\n\t\tisValid = $fields.filter(function() {\n\t\t\treturn validator.elementValue(this);\n\t\t}).length >= options[0];\n\n\t// Store the cloned validator for future validation\n\t$fieldsFirst.data(\"valid_req_grp\", validator);\n\n\t// If element isn't being validated, run each require_from_group field's validation rules\n\tif (!$(element).data(\"being_validated\")) {\n\t\t$fields.data(\"being_validated\", true);\n\t\t$fields.each(function() {\n\t\t\tvalidator.element(this);\n\t\t});\n\t\t$fields.data(\"being_validated\", false);\n\t}\n\treturn isValid;\n}, $.validator.format(\"Please fill at least {0} of these fields.\"));\n\n/*\n * Lets you say \"either at least X inputs that match selector Y must be filled,\n * OR they must all be skipped (left blank).\"\n *\n * The end result, is that none of these inputs:\n *\n *\t<input class=\"productinfo\" name=\"partnumber\">\n *\t<input class=\"productinfo\" name=\"description\">\n *\t<input class=\"productinfo\" name=\"color\">\n *\n *\t...will validate unless either at least two of them are filled,\n *\tOR none of them are.\n *\n * partnumber:\t{skip_or_fill_minimum: [2,\".productinfo\"]},\n * description: {skip_or_fill_minimum: [2,\".productinfo\"]},\n * color:\t\t{skip_or_fill_minimum: [2,\".productinfo\"]}\n *\n * options[0]: number of fields that must be filled in the group\n * options[1]: CSS selector that defines the group of conditionally required fields\n *\n */\n$.validator.addMethod(\"skip_or_fill_minimum\", function(value, element, options) {\n\tvar $fields = $(options[1], element.form),\n\t\t$fieldsFirst = $fields.eq(0),\n\t\tvalidator = $fieldsFirst.data(\"valid_skip\") ? $fieldsFirst.data(\"valid_skip\") : $.extend({}, this),\n\t\tnumberFilled = $fields.filter(function() {\n\t\t\treturn validator.elementValue(this);\n\t\t}).length,\n\t\tisValid = numberFilled === 0 || numberFilled >= options[0];\n\n\t// Store the cloned validator for future validation\n\t$fieldsFirst.data(\"valid_skip\", validator);\n\n\t// If element isn't being validated, run each skip_or_fill_minimum field's validation rules\n\tif (!$(element).data(\"being_validated\")) {\n\t\t$fields.data(\"being_validated\", true);\n\t\t$fields.each(function() {\n\t\t\tvalidator.element(this);\n\t\t});\n\t\t$fields.data(\"being_validated\", false);\n\t}\n\treturn isValid;\n}, $.validator.format(\"Please either skip these fields or fill at least {0} of them.\"));\n\n/* Validates US States and/or Territories by @jdforsythe\n * Can be case insensitive or require capitalization - default is case insensitive\n * Can include US Territories or not - default does not\n * Can include US Military postal abbreviations (AA, AE, AP) - default does not\n *\n * Note: \"States\" always includes DC (District of Colombia)\n *\n * Usage examples:\n *\n *  This is the default - case insensitive, no territories, no military zones\n *  stateInput: {\n *     caseSensitive: false,\n *     includeTerritories: false,\n *     includeMilitary: false\n *  }\n *\n *  Only allow capital letters, no territories, no military zones\n *  stateInput: {\n *     caseSensitive: false\n *  }\n *\n *  Case insensitive, include territories but not military zones\n *  stateInput: {\n *     includeTerritories: true\n *  }\n *\n *  Only allow capital letters, include territories and military zones\n *  stateInput: {\n *     caseSensitive: true,\n *     includeTerritories: true,\n *     includeMilitary: true\n *  }\n *\n *\n *\n */\n\n$.validator.addMethod(\"stateUS\", function(value, element, options) {\n\tvar isDefault = typeof options === \"undefined\",\n\t\tcaseSensitive = ( isDefault || typeof options.caseSensitive === \"undefined\" ) ? false : options.caseSensitive,\n\t\tincludeTerritories = ( isDefault || typeof options.includeTerritories === \"undefined\" ) ? false : options.includeTerritories,\n\t\tincludeMilitary = ( isDefault || typeof options.includeMilitary === \"undefined\" ) ? false : options.includeMilitary,\n\t\tregex;\n\n\tif (!includeTerritories && !includeMilitary) {\n\t\tregex = \"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$\";\n\t} else if (includeTerritories && includeMilitary) {\n\t\tregex = \"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$\";\n\t} else if (includeTerritories) {\n\t\tregex = \"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$\";\n\t} else {\n\t\tregex = \"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$\";\n\t}\n\n\tregex = caseSensitive ? new RegExp(regex) : new RegExp(regex, \"i\");\n\treturn this.optional(element) || regex.test(value);\n},\n\"Please specify a valid state\");\n\n// TODO check if value starts with <, otherwise don't try stripping anything\n$.validator.addMethod(\"strippedminlength\", function(value, element, param) {\n\treturn $(value).text().length >= param;\n}, $.validator.format(\"Please enter at least {0} characters\"));\n\n$.validator.addMethod(\"time\", function(value, element) {\n\treturn this.optional(element) || /^([01]\\d|2[0-3]|[0-9])(:[0-5]\\d){1,2}$/.test(value);\n}, \"Please enter a valid time, between 00:00 and 23:59\");\n\n$.validator.addMethod(\"time12h\", function(value, element) {\n\treturn this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\\d){1,2}(\\ ?[AP]M))$/i.test(value);\n}, \"Please enter a valid time in 12-hour am/pm format\");\n\n// same as url, but TLD is optional\n$.validator.addMethod(\"url2\", function(value, element) {\n\treturn this.optional(element) || /^(https?|ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)*(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.test(value);\n}, $.validator.messages.url);\n\n/**\n * Return true, if the value is a valid vehicle identification number (VIN).\n *\n * Works with all kind of text inputs.\n *\n * @example <input type=\"text\" size=\"20\" name=\"VehicleID\" class=\"{required:true,vinUS:true}\" />\n * @desc Declares a required input element whose value must be a valid vehicle identification number.\n *\n * @name $.validator.methods.vinUS\n * @type Boolean\n * @cat Plugins/Validate/Methods\n */\n$.validator.addMethod(\"vinUS\", function(v) {\n\tif (v.length !== 17) {\n\t\treturn false;\n\t}\n\n\tvar LL = [ \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"J\", \"K\", \"L\", \"M\", \"N\", \"P\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\" ],\n\t\tVL = [ 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 7, 9, 2, 3, 4, 5, 6, 7, 8, 9 ],\n\t\tFL = [ 8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2 ],\n\t\trs = 0,\n\t\ti, n, d, f, cd, cdv;\n\n\tfor (i = 0; i < 17; i++) {\n\t\tf = FL[i];\n\t\td = v.slice(i, i + 1);\n\t\tif (i === 8) {\n\t\t\tcdv = d;\n\t\t}\n\t\tif (!isNaN(d)) {\n\t\t\td *= f;\n\t\t} else {\n\t\t\tfor (n = 0; n < LL.length; n++) {\n\t\t\t\tif (d.toUpperCase() === LL[n]) {\n\t\t\t\t\td = VL[n];\n\t\t\t\t\td *= f;\n\t\t\t\t\tif (isNaN(cdv) && n === 8) {\n\t\t\t\t\t\tcdv = LL[n];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\trs += d;\n\t}\n\tcd = rs % 11;\n\tif (cd === 10) {\n\t\tcd = \"X\";\n\t}\n\tif (cd === cdv) {\n\t\treturn true;\n\t}\n\treturn false;\n}, \"The specified vehicle identification number (VIN) is invalid.\");\n\n$.validator.addMethod(\"zipcodeUS\", function(value, element) {\n\treturn this.optional(element) || /^\\d{5}(-\\d{4})?$/.test(value);\n}, \"The specified US ZIP Code is invalid\");\n\n$.validator.addMethod(\"ziprange\", function(value, element) {\n\treturn this.optional(element) || /^90[2-5]\\d\\{2\\}-\\d{4}$/.test(value);\n}, \"Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx\");\n\n}));"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/jquery-validation/dist/jquery.validate.js",
    "content": "/*!\n * jQuery Validation Plugin v1.14.0\n *\n * http://jqueryvalidation.org/\n *\n * Copyright (c) 2015 Jörn Zaefferer\n * Released under the MIT license\n */\n(function( factory ) {\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\tdefine( [\"jquery\"], factory );\n\t} else {\n\t\tfactory( jQuery );\n\t}\n}(function( $ ) {\n\n$.extend($.fn, {\n\t// http://jqueryvalidation.org/validate/\n\tvalidate: function( options ) {\n\n\t\t// if nothing is selected, return nothing; can't chain anyway\n\t\tif ( !this.length ) {\n\t\t\tif ( options && options.debug && window.console ) {\n\t\t\t\tconsole.warn( \"Nothing selected, can't validate, returning nothing.\" );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// check if a validator for this form was already created\n\t\tvar validator = $.data( this[ 0 ], \"validator\" );\n\t\tif ( validator ) {\n\t\t\treturn validator;\n\t\t}\n\n\t\t// Add novalidate tag if HTML5.\n\t\tthis.attr( \"novalidate\", \"novalidate\" );\n\n\t\tvalidator = new $.validator( options, this[ 0 ] );\n\t\t$.data( this[ 0 ], \"validator\", validator );\n\n\t\tif ( validator.settings.onsubmit ) {\n\n\t\t\tthis.on( \"click.validate\", \":submit\", function( event ) {\n\t\t\t\tif ( validator.settings.submitHandler ) {\n\t\t\t\t\tvalidator.submitButton = event.target;\n\t\t\t\t}\n\n\t\t\t\t// allow suppressing validation by adding a cancel class to the submit button\n\t\t\t\tif ( $( this ).hasClass( \"cancel\" ) ) {\n\t\t\t\t\tvalidator.cancelSubmit = true;\n\t\t\t\t}\n\n\t\t\t\t// allow suppressing validation by adding the html5 formnovalidate attribute to the submit button\n\t\t\t\tif ( $( this ).attr( \"formnovalidate\" ) !== undefined ) {\n\t\t\t\t\tvalidator.cancelSubmit = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// validate the form on submit\n\t\t\tthis.on( \"submit.validate\", function( event ) {\n\t\t\t\tif ( validator.settings.debug ) {\n\t\t\t\t\t// prevent form submit to be able to see console output\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t\tfunction handle() {\n\t\t\t\t\tvar hidden, result;\n\t\t\t\t\tif ( validator.settings.submitHandler ) {\n\t\t\t\t\t\tif ( validator.submitButton ) {\n\t\t\t\t\t\t\t// insert a hidden input as a replacement for the missing submit button\n\t\t\t\t\t\t\thidden = $( \"<input type='hidden'/>\" )\n\t\t\t\t\t\t\t\t.attr( \"name\", validator.submitButton.name )\n\t\t\t\t\t\t\t\t.val( $( validator.submitButton ).val() )\n\t\t\t\t\t\t\t\t.appendTo( validator.currentForm );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresult = validator.settings.submitHandler.call( validator, validator.currentForm, event );\n\t\t\t\t\t\tif ( validator.submitButton ) {\n\t\t\t\t\t\t\t// and clean up afterwards; thanks to no-block-scope, hidden can be referenced\n\t\t\t\t\t\t\thidden.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( result !== undefined ) {\n\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// prevent submit for invalid forms or custom submit handlers\n\t\t\t\tif ( validator.cancelSubmit ) {\n\t\t\t\t\tvalidator.cancelSubmit = false;\n\t\t\t\t\treturn handle();\n\t\t\t\t}\n\t\t\t\tif ( validator.form() ) {\n\t\t\t\t\tif ( validator.pendingRequest ) {\n\t\t\t\t\t\tvalidator.formSubmitted = true;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn handle();\n\t\t\t\t} else {\n\t\t\t\t\tvalidator.focusInvalid();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn validator;\n\t},\n\t// http://jqueryvalidation.org/valid/\n\tvalid: function() {\n\t\tvar valid, validator, errorList;\n\n\t\tif ( $( this[ 0 ] ).is( \"form\" ) ) {\n\t\t\tvalid = this.validate().form();\n\t\t} else {\n\t\t\terrorList = [];\n\t\t\tvalid = true;\n\t\t\tvalidator = $( this[ 0 ].form ).validate();\n\t\t\tthis.each( function() {\n\t\t\t\tvalid = validator.element( this ) && valid;\n\t\t\t\terrorList = errorList.concat( validator.errorList );\n\t\t\t});\n\t\t\tvalidator.errorList = errorList;\n\t\t}\n\t\treturn valid;\n\t},\n\n\t// http://jqueryvalidation.org/rules/\n\trules: function( command, argument ) {\n\t\tvar element = this[ 0 ],\n\t\t\tsettings, staticRules, existingRules, data, param, filtered;\n\n\t\tif ( command ) {\n\t\t\tsettings = $.data( element.form, \"validator\" ).settings;\n\t\t\tstaticRules = settings.rules;\n\t\t\texistingRules = $.validator.staticRules( element );\n\t\t\tswitch ( command ) {\n\t\t\tcase \"add\":\n\t\t\t\t$.extend( existingRules, $.validator.normalizeRule( argument ) );\n\t\t\t\t// remove messages from rules, but allow them to be set separately\n\t\t\t\tdelete existingRules.messages;\n\t\t\t\tstaticRules[ element.name ] = existingRules;\n\t\t\t\tif ( argument.messages ) {\n\t\t\t\t\tsettings.messages[ element.name ] = $.extend( settings.messages[ element.name ], argument.messages );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"remove\":\n\t\t\t\tif ( !argument ) {\n\t\t\t\t\tdelete staticRules[ element.name ];\n\t\t\t\t\treturn existingRules;\n\t\t\t\t}\n\t\t\t\tfiltered = {};\n\t\t\t\t$.each( argument.split( /\\s/ ), function( index, method ) {\n\t\t\t\t\tfiltered[ method ] = existingRules[ method ];\n\t\t\t\t\tdelete existingRules[ method ];\n\t\t\t\t\tif ( method === \"required\" ) {\n\t\t\t\t\t\t$( element ).removeAttr( \"aria-required\" );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn filtered;\n\t\t\t}\n\t\t}\n\n\t\tdata = $.validator.normalizeRules(\n\t\t$.extend(\n\t\t\t{},\n\t\t\t$.validator.classRules( element ),\n\t\t\t$.validator.attributeRules( element ),\n\t\t\t$.validator.dataRules( element ),\n\t\t\t$.validator.staticRules( element )\n\t\t), element );\n\n\t\t// make sure required is at front\n\t\tif ( data.required ) {\n\t\t\tparam = data.required;\n\t\t\tdelete data.required;\n\t\t\tdata = $.extend( { required: param }, data );\n\t\t\t$( element ).attr( \"aria-required\", \"true\" );\n\t\t}\n\n\t\t// make sure remote is at back\n\t\tif ( data.remote ) {\n\t\t\tparam = data.remote;\n\t\t\tdelete data.remote;\n\t\t\tdata = $.extend( data, { remote: param });\n\t\t}\n\n\t\treturn data;\n\t}\n});\n\n// Custom selectors\n$.extend( $.expr[ \":\" ], {\n\t// http://jqueryvalidation.org/blank-selector/\n\tblank: function( a ) {\n\t\treturn !$.trim( \"\" + $( a ).val() );\n\t},\n\t// http://jqueryvalidation.org/filled-selector/\n\tfilled: function( a ) {\n\t\treturn !!$.trim( \"\" + $( a ).val() );\n\t},\n\t// http://jqueryvalidation.org/unchecked-selector/\n\tunchecked: function( a ) {\n\t\treturn !$( a ).prop( \"checked\" );\n\t}\n});\n\n// constructor for validator\n$.validator = function( options, form ) {\n\tthis.settings = $.extend( true, {}, $.validator.defaults, options );\n\tthis.currentForm = form;\n\tthis.init();\n};\n\n// http://jqueryvalidation.org/jQuery.validator.format/\n$.validator.format = function( source, params ) {\n\tif ( arguments.length === 1 ) {\n\t\treturn function() {\n\t\t\tvar args = $.makeArray( arguments );\n\t\t\targs.unshift( source );\n\t\t\treturn $.validator.format.apply( this, args );\n\t\t};\n\t}\n\tif ( arguments.length > 2 && params.constructor !== Array  ) {\n\t\tparams = $.makeArray( arguments ).slice( 1 );\n\t}\n\tif ( params.constructor !== Array ) {\n\t\tparams = [ params ];\n\t}\n\t$.each( params, function( i, n ) {\n\t\tsource = source.replace( new RegExp( \"\\\\{\" + i + \"\\\\}\", \"g\" ), function() {\n\t\t\treturn n;\n\t\t});\n\t});\n\treturn source;\n};\n\n$.extend( $.validator, {\n\n\tdefaults: {\n\t\tmessages: {},\n\t\tgroups: {},\n\t\trules: {},\n\t\terrorClass: \"error\",\n\t\tvalidClass: \"valid\",\n\t\terrorElement: \"label\",\n\t\tfocusCleanup: false,\n\t\tfocusInvalid: true,\n\t\terrorContainer: $( [] ),\n\t\terrorLabelContainer: $( [] ),\n\t\tonsubmit: true,\n\t\tignore: \":hidden\",\n\t\tignoreTitle: false,\n\t\tonfocusin: function( element ) {\n\t\t\tthis.lastActive = element;\n\n\t\t\t// Hide error label and remove error class on focus if enabled\n\t\t\tif ( this.settings.focusCleanup ) {\n\t\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t\tthis.hideThese( this.errorsFor( element ) );\n\t\t\t}\n\t\t},\n\t\tonfocusout: function( element ) {\n\t\t\tif ( !this.checkable( element ) && ( element.name in this.submitted || !this.optional( element ) ) ) {\n\t\t\t\tthis.element( element );\n\t\t\t}\n\t\t},\n\t\tonkeyup: function( element, event ) {\n\t\t\t// Avoid revalidate the field when pressing one of the following keys\n\t\t\t// Shift       => 16\n\t\t\t// Ctrl        => 17\n\t\t\t// Alt         => 18\n\t\t\t// Caps lock   => 20\n\t\t\t// End         => 35\n\t\t\t// Home        => 36\n\t\t\t// Left arrow  => 37\n\t\t\t// Up arrow    => 38\n\t\t\t// Right arrow => 39\n\t\t\t// Down arrow  => 40\n\t\t\t// Insert      => 45\n\t\t\t// Num lock    => 144\n\t\t\t// AltGr key   => 225\n\t\t\tvar excludedKeys = [\n\t\t\t\t16, 17, 18, 20, 35, 36, 37,\n\t\t\t\t38, 39, 40, 45, 144, 225\n\t\t\t];\n\n\t\t\tif ( event.which === 9 && this.elementValue( element ) === \"\" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {\n\t\t\t\treturn;\n\t\t\t} else if ( element.name in this.submitted || element === this.lastElement ) {\n\t\t\t\tthis.element( element );\n\t\t\t}\n\t\t},\n\t\tonclick: function( element ) {\n\t\t\t// click on selects, radiobuttons and checkboxes\n\t\t\tif ( element.name in this.submitted ) {\n\t\t\t\tthis.element( element );\n\n\t\t\t// or option elements, check parent select in that case\n\t\t\t} else if ( element.parentNode.name in this.submitted ) {\n\t\t\t\tthis.element( element.parentNode );\n\t\t\t}\n\t\t},\n\t\thighlight: function( element, errorClass, validClass ) {\n\t\t\tif ( element.type === \"radio\" ) {\n\t\t\t\tthis.findByName( element.name ).addClass( errorClass ).removeClass( validClass );\n\t\t\t} else {\n\t\t\t\t$( element ).addClass( errorClass ).removeClass( validClass );\n\t\t\t}\n\t\t},\n\t\tunhighlight: function( element, errorClass, validClass ) {\n\t\t\tif ( element.type === \"radio\" ) {\n\t\t\t\tthis.findByName( element.name ).removeClass( errorClass ).addClass( validClass );\n\t\t\t} else {\n\t\t\t\t$( element ).removeClass( errorClass ).addClass( validClass );\n\t\t\t}\n\t\t}\n\t},\n\n\t// http://jqueryvalidation.org/jQuery.validator.setDefaults/\n\tsetDefaults: function( settings ) {\n\t\t$.extend( $.validator.defaults, settings );\n\t},\n\n\tmessages: {\n\t\trequired: \"This field is required.\",\n\t\tremote: \"Please fix this field.\",\n\t\temail: \"Please enter a valid email address.\",\n\t\turl: \"Please enter a valid URL.\",\n\t\tdate: \"Please enter a valid date.\",\n\t\tdateISO: \"Please enter a valid date ( ISO ).\",\n\t\tnumber: \"Please enter a valid number.\",\n\t\tdigits: \"Please enter only digits.\",\n\t\tcreditcard: \"Please enter a valid credit card number.\",\n\t\tequalTo: \"Please enter the same value again.\",\n\t\tmaxlength: $.validator.format( \"Please enter no more than {0} characters.\" ),\n\t\tminlength: $.validator.format( \"Please enter at least {0} characters.\" ),\n\t\trangelength: $.validator.format( \"Please enter a value between {0} and {1} characters long.\" ),\n\t\trange: $.validator.format( \"Please enter a value between {0} and {1}.\" ),\n\t\tmax: $.validator.format( \"Please enter a value less than or equal to {0}.\" ),\n\t\tmin: $.validator.format( \"Please enter a value greater than or equal to {0}.\" )\n\t},\n\n\tautoCreateRanges: false,\n\n\tprototype: {\n\n\t\tinit: function() {\n\t\t\tthis.labelContainer = $( this.settings.errorLabelContainer );\n\t\t\tthis.errorContext = this.labelContainer.length && this.labelContainer || $( this.currentForm );\n\t\t\tthis.containers = $( this.settings.errorContainer ).add( this.settings.errorLabelContainer );\n\t\t\tthis.submitted = {};\n\t\t\tthis.valueCache = {};\n\t\t\tthis.pendingRequest = 0;\n\t\t\tthis.pending = {};\n\t\t\tthis.invalid = {};\n\t\t\tthis.reset();\n\n\t\t\tvar groups = ( this.groups = {} ),\n\t\t\t\trules;\n\t\t\t$.each( this.settings.groups, function( key, value ) {\n\t\t\t\tif ( typeof value === \"string\" ) {\n\t\t\t\t\tvalue = value.split( /\\s/ );\n\t\t\t\t}\n\t\t\t\t$.each( value, function( index, name ) {\n\t\t\t\t\tgroups[ name ] = key;\n\t\t\t\t});\n\t\t\t});\n\t\t\trules = this.settings.rules;\n\t\t\t$.each( rules, function( key, value ) {\n\t\t\t\trules[ key ] = $.validator.normalizeRule( value );\n\t\t\t});\n\n\t\t\tfunction delegate( event ) {\n\t\t\t\tvar validator = $.data( this.form, \"validator\" ),\n\t\t\t\t\teventType = \"on\" + event.type.replace( /^validate/, \"\" ),\n\t\t\t\t\tsettings = validator.settings;\n\t\t\t\tif ( settings[ eventType ] && !$( this ).is( settings.ignore ) ) {\n\t\t\t\t\tsettings[ eventType ].call( validator, this, event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$( this.currentForm )\n\t\t\t\t.on( \"focusin.validate focusout.validate keyup.validate\",\n\t\t\t\t\t\":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], \" +\n\t\t\t\t\t\"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], \" +\n\t\t\t\t\t\"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], \" +\n\t\t\t\t\t\"[type='radio'], [type='checkbox']\", delegate)\n\t\t\t\t// Support: Chrome, oldIE\n\t\t\t\t// \"select\" is provided as event.target when clicking a option\n\t\t\t\t.on(\"click.validate\", \"select, option, [type='radio'], [type='checkbox']\", delegate);\n\n\t\t\tif ( this.settings.invalidHandler ) {\n\t\t\t\t$( this.currentForm ).on( \"invalid-form.validate\", this.settings.invalidHandler );\n\t\t\t}\n\n\t\t\t// Add aria-required to any Static/Data/Class required fields before first validation\n\t\t\t// Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html\n\t\t\t$( this.currentForm ).find( \"[required], [data-rule-required], .required\" ).attr( \"aria-required\", \"true\" );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/Validator.form/\n\t\tform: function() {\n\t\t\tthis.checkForm();\n\t\t\t$.extend( this.submitted, this.errorMap );\n\t\t\tthis.invalid = $.extend({}, this.errorMap );\n\t\t\tif ( !this.valid() ) {\n\t\t\t\t$( this.currentForm ).triggerHandler( \"invalid-form\", [ this ]);\n\t\t\t}\n\t\t\tthis.showErrors();\n\t\t\treturn this.valid();\n\t\t},\n\n\t\tcheckForm: function() {\n\t\t\tthis.prepareForm();\n\t\t\tfor ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) {\n\t\t\t\tthis.check( elements[ i ] );\n\t\t\t}\n\t\t\treturn this.valid();\n\t\t},\n\n\t\t// http://jqueryvalidation.org/Validator.element/\n\t\telement: function( element ) {\n\t\t\tvar cleanElement = this.clean( element ),\n\t\t\t\tcheckElement = this.validationTargetFor( cleanElement ),\n\t\t\t\tresult = true;\n\n\t\t\tthis.lastElement = checkElement;\n\n\t\t\tif ( checkElement === undefined ) {\n\t\t\t\tdelete this.invalid[ cleanElement.name ];\n\t\t\t} else {\n\t\t\t\tthis.prepareElement( checkElement );\n\t\t\t\tthis.currentElements = $( checkElement );\n\n\t\t\t\tresult = this.check( checkElement ) !== false;\n\t\t\t\tif ( result ) {\n\t\t\t\t\tdelete this.invalid[ checkElement.name ];\n\t\t\t\t} else {\n\t\t\t\t\tthis.invalid[ checkElement.name ] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Add aria-invalid status for screen readers\n\t\t\t$( element ).attr( \"aria-invalid\", !result );\n\n\t\t\tif ( !this.numberOfInvalids() ) {\n\t\t\t\t// Hide error containers on last error\n\t\t\t\tthis.toHide = this.toHide.add( this.containers );\n\t\t\t}\n\t\t\tthis.showErrors();\n\t\t\treturn result;\n\t\t},\n\n\t\t// http://jqueryvalidation.org/Validator.showErrors/\n\t\tshowErrors: function( errors ) {\n\t\t\tif ( errors ) {\n\t\t\t\t// add items to error list and map\n\t\t\t\t$.extend( this.errorMap, errors );\n\t\t\t\tthis.errorList = [];\n\t\t\t\tfor ( var name in errors ) {\n\t\t\t\t\tthis.errorList.push({\n\t\t\t\t\t\tmessage: errors[ name ],\n\t\t\t\t\t\telement: this.findByName( name )[ 0 ]\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t// remove items from success list\n\t\t\t\tthis.successList = $.grep( this.successList, function( element ) {\n\t\t\t\t\treturn !( element.name in errors );\n\t\t\t\t});\n\t\t\t}\n\t\t\tif ( this.settings.showErrors ) {\n\t\t\t\tthis.settings.showErrors.call( this, this.errorMap, this.errorList );\n\t\t\t} else {\n\t\t\t\tthis.defaultShowErrors();\n\t\t\t}\n\t\t},\n\n\t\t// http://jqueryvalidation.org/Validator.resetForm/\n\t\tresetForm: function() {\n\t\t\tif ( $.fn.resetForm ) {\n\t\t\t\t$( this.currentForm ).resetForm();\n\t\t\t}\n\t\t\tthis.submitted = {};\n\t\t\tthis.lastElement = null;\n\t\t\tthis.prepareForm();\n\t\t\tthis.hideErrors();\n\t\t\tvar i, elements = this.elements()\n\t\t\t\t.removeData( \"previousValue\" )\n\t\t\t\t.removeAttr( \"aria-invalid\" );\n\n\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\tfor ( i = 0; elements[ i ]; i++ ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[ i ],\n\t\t\t\t\t\tthis.settings.errorClass, \"\" );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\telements.removeClass( this.settings.errorClass );\n\t\t\t}\n\t\t},\n\n\t\tnumberOfInvalids: function() {\n\t\t\treturn this.objectLength( this.invalid );\n\t\t},\n\n\t\tobjectLength: function( obj ) {\n\t\t\t/* jshint unused: false */\n\t\t\tvar count = 0,\n\t\t\t\ti;\n\t\t\tfor ( i in obj ) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\treturn count;\n\t\t},\n\n\t\thideErrors: function() {\n\t\t\tthis.hideThese( this.toHide );\n\t\t},\n\n\t\thideThese: function( errors ) {\n\t\t\terrors.not( this.containers ).text( \"\" );\n\t\t\tthis.addWrapper( errors ).hide();\n\t\t},\n\n\t\tvalid: function() {\n\t\t\treturn this.size() === 0;\n\t\t},\n\n\t\tsize: function() {\n\t\t\treturn this.errorList.length;\n\t\t},\n\n\t\tfocusInvalid: function() {\n\t\t\tif ( this.settings.focusInvalid ) {\n\t\t\t\ttry {\n\t\t\t\t\t$( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])\n\t\t\t\t\t.filter( \":visible\" )\n\t\t\t\t\t.focus()\n\t\t\t\t\t// manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find\n\t\t\t\t\t.trigger( \"focusin\" );\n\t\t\t\t} catch ( e ) {\n\t\t\t\t\t// ignore IE throwing errors when focusing hidden elements\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tfindLastActive: function() {\n\t\t\tvar lastActive = this.lastActive;\n\t\t\treturn lastActive && $.grep( this.errorList, function( n ) {\n\t\t\t\treturn n.element.name === lastActive.name;\n\t\t\t}).length === 1 && lastActive;\n\t\t},\n\n\t\telements: function() {\n\t\t\tvar validator = this,\n\t\t\t\trulesCache = {};\n\n\t\t\t// select all valid inputs inside the form (no submit or reset buttons)\n\t\t\treturn $( this.currentForm )\n\t\t\t.find( \"input, select, textarea\" )\n\t\t\t.not( \":submit, :reset, :image, :disabled\" )\n\t\t\t.not( this.settings.ignore )\n\t\t\t.filter( function() {\n\t\t\t\tif ( !this.name && validator.settings.debug && window.console ) {\n\t\t\t\t\tconsole.error( \"%o has no name assigned\", this );\n\t\t\t\t}\n\n\t\t\t\t// select only the first element for each name, and only those with rules specified\n\t\t\t\tif ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\trulesCache[ this.name ] = true;\n\t\t\t\treturn true;\n\t\t\t});\n\t\t},\n\n\t\tclean: function( selector ) {\n\t\t\treturn $( selector )[ 0 ];\n\t\t},\n\n\t\terrors: function() {\n\t\t\tvar errorClass = this.settings.errorClass.split( \" \" ).join( \".\" );\n\t\t\treturn $( this.settings.errorElement + \".\" + errorClass, this.errorContext );\n\t\t},\n\n\t\treset: function() {\n\t\t\tthis.successList = [];\n\t\t\tthis.errorList = [];\n\t\t\tthis.errorMap = {};\n\t\t\tthis.toShow = $( [] );\n\t\t\tthis.toHide = $( [] );\n\t\t\tthis.currentElements = $( [] );\n\t\t},\n\n\t\tprepareForm: function() {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errors().add( this.containers );\n\t\t},\n\n\t\tprepareElement: function( element ) {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errorsFor( element );\n\t\t},\n\n\t\telementValue: function( element ) {\n\t\t\tvar val,\n\t\t\t\t$element = $( element ),\n\t\t\t\ttype = element.type;\n\n\t\t\tif ( type === \"radio\" || type === \"checkbox\" ) {\n\t\t\t\treturn this.findByName( element.name ).filter(\":checked\").val();\n\t\t\t} else if ( type === \"number\" && typeof element.validity !== \"undefined\" ) {\n\t\t\t\treturn element.validity.badInput ? false : $element.val();\n\t\t\t}\n\n\t\t\tval = $element.val();\n\t\t\tif ( typeof val === \"string\" ) {\n\t\t\t\treturn val.replace(/\\r/g, \"\" );\n\t\t\t}\n\t\t\treturn val;\n\t\t},\n\n\t\tcheck: function( element ) {\n\t\t\telement = this.validationTargetFor( this.clean( element ) );\n\n\t\t\tvar rules = $( element ).rules(),\n\t\t\t\trulesCount = $.map( rules, function( n, i ) {\n\t\t\t\t\treturn i;\n\t\t\t\t}).length,\n\t\t\t\tdependencyMismatch = false,\n\t\t\t\tval = this.elementValue( element ),\n\t\t\t\tresult, method, rule;\n\n\t\t\tfor ( method in rules ) {\n\t\t\t\trule = { method: method, parameters: rules[ method ] };\n\t\t\t\ttry {\n\n\t\t\t\t\tresult = $.validator.methods[ method ].call( this, val, element, rule.parameters );\n\n\t\t\t\t\t// if a method indicates that the field is optional and therefore valid,\n\t\t\t\t\t// don't mark it as valid when there are no other rules\n\t\t\t\t\tif ( result === \"dependency-mismatch\" && rulesCount === 1 ) {\n\t\t\t\t\t\tdependencyMismatch = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tdependencyMismatch = false;\n\n\t\t\t\t\tif ( result === \"pending\" ) {\n\t\t\t\t\t\tthis.toHide = this.toHide.not( this.errorsFor( element ) );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !result ) {\n\t\t\t\t\t\tthis.formatAndAdd( element, rule );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} catch ( e ) {\n\t\t\t\t\tif ( this.settings.debug && window.console ) {\n\t\t\t\t\t\tconsole.log( \"Exception occurred when checking element \" + element.id + \", check the '\" + rule.method + \"' method.\", e );\n\t\t\t\t\t}\n\t\t\t\t\tif ( e instanceof TypeError ) {\n\t\t\t\t\t\te.message += \".  Exception occurred when checking element \" + element.id + \", check the '\" + rule.method + \"' method.\";\n\t\t\t\t\t}\n\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( dependencyMismatch ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( this.objectLength( rules ) ) {\n\t\t\t\tthis.successList.push( element );\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t// return the custom message for the given element and validation method\n\t\t// specified in the element's HTML5 data attribute\n\t\t// return the generic message if present and no method specific message is present\n\t\tcustomDataMessage: function( element, method ) {\n\t\t\treturn $( element ).data( \"msg\" + method.charAt( 0 ).toUpperCase() +\n\t\t\t\tmethod.substring( 1 ).toLowerCase() ) || $( element ).data( \"msg\" );\n\t\t},\n\n\t\t// return the custom message for the given element name and validation method\n\t\tcustomMessage: function( name, method ) {\n\t\t\tvar m = this.settings.messages[ name ];\n\t\t\treturn m && ( m.constructor === String ? m : m[ method ]);\n\t\t},\n\n\t\t// return the first defined argument, allowing empty strings\n\t\tfindDefined: function() {\n\t\t\tfor ( var i = 0; i < arguments.length; i++) {\n\t\t\t\tif ( arguments[ i ] !== undefined ) {\n\t\t\t\t\treturn arguments[ i ];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\n\t\tdefaultMessage: function( element, method ) {\n\t\t\treturn this.findDefined(\n\t\t\t\tthis.customMessage( element.name, method ),\n\t\t\t\tthis.customDataMessage( element, method ),\n\t\t\t\t// title is never undefined, so handle empty string as undefined\n\t\t\t\t!this.settings.ignoreTitle && element.title || undefined,\n\t\t\t\t$.validator.messages[ method ],\n\t\t\t\t\"<strong>Warning: No message defined for \" + element.name + \"</strong>\"\n\t\t\t);\n\t\t},\n\n\t\tformatAndAdd: function( element, rule ) {\n\t\t\tvar message = this.defaultMessage( element, rule.method ),\n\t\t\t\ttheregex = /\\$?\\{(\\d+)\\}/g;\n\t\t\tif ( typeof message === \"function\" ) {\n\t\t\t\tmessage = message.call( this, rule.parameters, element );\n\t\t\t} else if ( theregex.test( message ) ) {\n\t\t\t\tmessage = $.validator.format( message.replace( theregex, \"{$1}\" ), rule.parameters );\n\t\t\t}\n\t\t\tthis.errorList.push({\n\t\t\t\tmessage: message,\n\t\t\t\telement: element,\n\t\t\t\tmethod: rule.method\n\t\t\t});\n\n\t\t\tthis.errorMap[ element.name ] = message;\n\t\t\tthis.submitted[ element.name ] = message;\n\t\t},\n\n\t\taddWrapper: function( toToggle ) {\n\t\t\tif ( this.settings.wrapper ) {\n\t\t\t\ttoToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );\n\t\t\t}\n\t\t\treturn toToggle;\n\t\t},\n\n\t\tdefaultShowErrors: function() {\n\t\t\tvar i, elements, error;\n\t\t\tfor ( i = 0; this.errorList[ i ]; i++ ) {\n\t\t\t\terror = this.errorList[ i ];\n\t\t\t\tif ( this.settings.highlight ) {\n\t\t\t\t\tthis.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t\tthis.showLabel( error.element, error.message );\n\t\t\t}\n\t\t\tif ( this.errorList.length ) {\n\t\t\t\tthis.toShow = this.toShow.add( this.containers );\n\t\t\t}\n\t\t\tif ( this.settings.success ) {\n\t\t\t\tfor ( i = 0; this.successList[ i ]; i++ ) {\n\t\t\t\t\tthis.showLabel( this.successList[ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\tfor ( i = 0, elements = this.validElements(); elements[ i ]; i++ ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[ i ], this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.toHide = this.toHide.not( this.toShow );\n\t\t\tthis.hideErrors();\n\t\t\tthis.addWrapper( this.toShow ).show();\n\t\t},\n\n\t\tvalidElements: function() {\n\t\t\treturn this.currentElements.not( this.invalidElements() );\n\t\t},\n\n\t\tinvalidElements: function() {\n\t\t\treturn $( this.errorList ).map(function() {\n\t\t\t\treturn this.element;\n\t\t\t});\n\t\t},\n\n\t\tshowLabel: function( element, message ) {\n\t\t\tvar place, group, errorID,\n\t\t\t\terror = this.errorsFor( element ),\n\t\t\t\telementID = this.idOrName( element ),\n\t\t\t\tdescribedBy = $( element ).attr( \"aria-describedby\" );\n\t\t\tif ( error.length ) {\n\t\t\t\t// refresh error/success class\n\t\t\t\terror.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );\n\t\t\t\t// replace message on existing label\n\t\t\t\terror.html( message );\n\t\t\t} else {\n\t\t\t\t// create error element\n\t\t\t\terror = $( \"<\" + this.settings.errorElement + \">\" )\n\t\t\t\t\t.attr( \"id\", elementID + \"-error\" )\n\t\t\t\t\t.addClass( this.settings.errorClass )\n\t\t\t\t\t.html( message || \"\" );\n\n\t\t\t\t// Maintain reference to the element to be placed into the DOM\n\t\t\t\tplace = error;\n\t\t\t\tif ( this.settings.wrapper ) {\n\t\t\t\t\t// make sure the element is visible, even in IE\n\t\t\t\t\t// actually showing the wrapped element is handled elsewhere\n\t\t\t\t\tplace = error.hide().show().wrap( \"<\" + this.settings.wrapper + \"/>\" ).parent();\n\t\t\t\t}\n\t\t\t\tif ( this.labelContainer.length ) {\n\t\t\t\t\tthis.labelContainer.append( place );\n\t\t\t\t} else if ( this.settings.errorPlacement ) {\n\t\t\t\t\tthis.settings.errorPlacement( place, $( element ) );\n\t\t\t\t} else {\n\t\t\t\t\tplace.insertAfter( element );\n\t\t\t\t}\n\n\t\t\t\t// Link error back to the element\n\t\t\t\tif ( error.is( \"label\" ) ) {\n\t\t\t\t\t// If the error is a label, then associate using 'for'\n\t\t\t\t\terror.attr( \"for\", elementID );\n\t\t\t\t} else if ( error.parents( \"label[for='\" + elementID + \"']\" ).length === 0 ) {\n\t\t\t\t\t// If the element is not a child of an associated label, then it's necessary\n\t\t\t\t\t// to explicitly apply aria-describedby\n\n\t\t\t\t\terrorID = error.attr( \"id\" ).replace( /(:|\\.|\\[|\\]|\\$)/g, \"\\\\$1\");\n\t\t\t\t\t// Respect existing non-error aria-describedby\n\t\t\t\t\tif ( !describedBy ) {\n\t\t\t\t\t\tdescribedBy = errorID;\n\t\t\t\t\t} else if ( !describedBy.match( new RegExp( \"\\\\b\" + errorID + \"\\\\b\" ) ) ) {\n\t\t\t\t\t\t// Add to end of list if not already present\n\t\t\t\t\t\tdescribedBy += \" \" + errorID;\n\t\t\t\t\t}\n\t\t\t\t\t$( element ).attr( \"aria-describedby\", describedBy );\n\n\t\t\t\t\t// If this element is grouped, then assign to all elements in the same group\n\t\t\t\t\tgroup = this.groups[ element.name ];\n\t\t\t\t\tif ( group ) {\n\t\t\t\t\t\t$.each( this.groups, function( name, testgroup ) {\n\t\t\t\t\t\t\tif ( testgroup === group ) {\n\t\t\t\t\t\t\t\t$( \"[name='\" + name + \"']\", this.currentForm )\n\t\t\t\t\t\t\t\t\t.attr( \"aria-describedby\", error.attr( \"id\" ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !message && this.settings.success ) {\n\t\t\t\terror.text( \"\" );\n\t\t\t\tif ( typeof this.settings.success === \"string\" ) {\n\t\t\t\t\terror.addClass( this.settings.success );\n\t\t\t\t} else {\n\t\t\t\t\tthis.settings.success( error, element );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.toShow = this.toShow.add( error );\n\t\t},\n\n\t\terrorsFor: function( element ) {\n\t\t\tvar name = this.idOrName( element ),\n\t\t\t\tdescriber = $( element ).attr( \"aria-describedby\" ),\n\t\t\t\tselector = \"label[for='\" + name + \"'], label[for='\" + name + \"'] *\";\n\n\t\t\t// aria-describedby should directly reference the error element\n\t\t\tif ( describer ) {\n\t\t\t\tselector = selector + \", #\" + describer.replace( /\\s+/g, \", #\" );\n\t\t\t}\n\t\t\treturn this\n\t\t\t\t.errors()\n\t\t\t\t.filter( selector );\n\t\t},\n\n\t\tidOrName: function( element ) {\n\t\t\treturn this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );\n\t\t},\n\n\t\tvalidationTargetFor: function( element ) {\n\n\t\t\t// If radio/checkbox, validate first element in group instead\n\t\t\tif ( this.checkable( element ) ) {\n\t\t\t\telement = this.findByName( element.name );\n\t\t\t}\n\n\t\t\t// Always apply ignore filter\n\t\t\treturn $( element ).not( this.settings.ignore )[ 0 ];\n\t\t},\n\n\t\tcheckable: function( element ) {\n\t\t\treturn ( /radio|checkbox/i ).test( element.type );\n\t\t},\n\n\t\tfindByName: function( name ) {\n\t\t\treturn $( this.currentForm ).find( \"[name='\" + name + \"']\" );\n\t\t},\n\n\t\tgetLength: function( value, element ) {\n\t\t\tswitch ( element.nodeName.toLowerCase() ) {\n\t\t\tcase \"select\":\n\t\t\t\treturn $( \"option:selected\", element ).length;\n\t\t\tcase \"input\":\n\t\t\t\tif ( this.checkable( element ) ) {\n\t\t\t\t\treturn this.findByName( element.name ).filter( \":checked\" ).length;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn value.length;\n\t\t},\n\n\t\tdepend: function( param, element ) {\n\t\t\treturn this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;\n\t\t},\n\n\t\tdependTypes: {\n\t\t\t\"boolean\": function( param ) {\n\t\t\t\treturn param;\n\t\t\t},\n\t\t\t\"string\": function( param, element ) {\n\t\t\t\treturn !!$( param, element.form ).length;\n\t\t\t},\n\t\t\t\"function\": function( param, element ) {\n\t\t\t\treturn param( element );\n\t\t\t}\n\t\t},\n\n\t\toptional: function( element ) {\n\t\t\tvar val = this.elementValue( element );\n\t\t\treturn !$.validator.methods.required.call( this, val, element ) && \"dependency-mismatch\";\n\t\t},\n\n\t\tstartRequest: function( element ) {\n\t\t\tif ( !this.pending[ element.name ] ) {\n\t\t\t\tthis.pendingRequest++;\n\t\t\t\tthis.pending[ element.name ] = true;\n\t\t\t}\n\t\t},\n\n\t\tstopRequest: function( element, valid ) {\n\t\t\tthis.pendingRequest--;\n\t\t\t// sometimes synchronization fails, make sure pendingRequest is never < 0\n\t\t\tif ( this.pendingRequest < 0 ) {\n\t\t\t\tthis.pendingRequest = 0;\n\t\t\t}\n\t\t\tdelete this.pending[ element.name ];\n\t\t\tif ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {\n\t\t\t\t$( this.currentForm ).submit();\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t} else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {\n\t\t\t\t$( this.currentForm ).triggerHandler( \"invalid-form\", [ this ]);\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t}\n\t\t},\n\n\t\tpreviousValue: function( element ) {\n\t\t\treturn $.data( element, \"previousValue\" ) || $.data( element, \"previousValue\", {\n\t\t\t\told: null,\n\t\t\t\tvalid: true,\n\t\t\t\tmessage: this.defaultMessage( element, \"remote\" )\n\t\t\t});\n\t\t},\n\n\t\t// cleans up all forms and elements, removes validator-specific events\n\t\tdestroy: function() {\n\t\t\tthis.resetForm();\n\n\t\t\t$( this.currentForm )\n\t\t\t\t.off( \".validate\" )\n\t\t\t\t.removeData( \"validator\" );\n\t\t}\n\n\t},\n\n\tclassRuleSettings: {\n\t\trequired: { required: true },\n\t\temail: { email: true },\n\t\turl: { url: true },\n\t\tdate: { date: true },\n\t\tdateISO: { dateISO: true },\n\t\tnumber: { number: true },\n\t\tdigits: { digits: true },\n\t\tcreditcard: { creditcard: true }\n\t},\n\n\taddClassRules: function( className, rules ) {\n\t\tif ( className.constructor === String ) {\n\t\t\tthis.classRuleSettings[ className ] = rules;\n\t\t} else {\n\t\t\t$.extend( this.classRuleSettings, className );\n\t\t}\n\t},\n\n\tclassRules: function( element ) {\n\t\tvar rules = {},\n\t\t\tclasses = $( element ).attr( \"class\" );\n\n\t\tif ( classes ) {\n\t\t\t$.each( classes.split( \" \" ), function() {\n\t\t\t\tif ( this in $.validator.classRuleSettings ) {\n\t\t\t\t\t$.extend( rules, $.validator.classRuleSettings[ this ]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn rules;\n\t},\n\n\tnormalizeAttributeRule: function( rules, type, method, value ) {\n\n\t\t// convert the value to a number for number inputs, and for text for backwards compability\n\t\t// allows type=\"date\" and others to be compared as strings\n\t\tif ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {\n\t\t\tvalue = Number( value );\n\n\t\t\t// Support Opera Mini, which returns NaN for undefined minlength\n\t\t\tif ( isNaN( value ) ) {\n\t\t\t\tvalue = undefined;\n\t\t\t}\n\t\t}\n\n\t\tif ( value || value === 0 ) {\n\t\t\trules[ method ] = value;\n\t\t} else if ( type === method && type !== \"range\" ) {\n\n\t\t\t// exception: the jquery validate 'range' method\n\t\t\t// does not test for the html5 'range' type\n\t\t\trules[ method ] = true;\n\t\t}\n\t},\n\n\tattributeRules: function( element ) {\n\t\tvar rules = {},\n\t\t\t$element = $( element ),\n\t\t\ttype = element.getAttribute( \"type\" ),\n\t\t\tmethod, value;\n\n\t\tfor ( method in $.validator.methods ) {\n\n\t\t\t// support for <input required> in both html5 and older browsers\n\t\t\tif ( method === \"required\" ) {\n\t\t\t\tvalue = element.getAttribute( method );\n\n\t\t\t\t// Some browsers return an empty string for the required attribute\n\t\t\t\t// and non-HTML5 browsers might have required=\"\" markup\n\t\t\t\tif ( value === \"\" ) {\n\t\t\t\t\tvalue = true;\n\t\t\t\t}\n\n\t\t\t\t// force non-HTML5 browsers to return bool\n\t\t\t\tvalue = !!value;\n\t\t\t} else {\n\t\t\t\tvalue = $element.attr( method );\n\t\t\t}\n\n\t\t\tthis.normalizeAttributeRule( rules, type, method, value );\n\t\t}\n\n\t\t// maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs\n\t\tif ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {\n\t\t\tdelete rules.maxlength;\n\t\t}\n\n\t\treturn rules;\n\t},\n\n\tdataRules: function( element ) {\n\t\tvar rules = {},\n\t\t\t$element = $( element ),\n\t\t\ttype = element.getAttribute( \"type\" ),\n\t\t\tmethod, value;\n\n\t\tfor ( method in $.validator.methods ) {\n\t\t\tvalue = $element.data( \"rule\" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );\n\t\t\tthis.normalizeAttributeRule( rules, type, method, value );\n\t\t}\n\t\treturn rules;\n\t},\n\n\tstaticRules: function( element ) {\n\t\tvar rules = {},\n\t\t\tvalidator = $.data( element.form, \"validator\" );\n\n\t\tif ( validator.settings.rules ) {\n\t\t\trules = $.validator.normalizeRule( validator.settings.rules[ element.name ] ) || {};\n\t\t}\n\t\treturn rules;\n\t},\n\n\tnormalizeRules: function( rules, element ) {\n\t\t// handle dependency check\n\t\t$.each( rules, function( prop, val ) {\n\t\t\t// ignore rule when param is explicitly false, eg. required:false\n\t\t\tif ( val === false ) {\n\t\t\t\tdelete rules[ prop ];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( val.param || val.depends ) {\n\t\t\t\tvar keepRule = true;\n\t\t\t\tswitch ( typeof val.depends ) {\n\t\t\t\tcase \"string\":\n\t\t\t\t\tkeepRule = !!$( val.depends, element.form ).length;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"function\":\n\t\t\t\t\tkeepRule = val.depends.call( element, element );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( keepRule ) {\n\t\t\t\t\trules[ prop ] = val.param !== undefined ? val.param : true;\n\t\t\t\t} else {\n\t\t\t\t\tdelete rules[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// evaluate parameters\n\t\t$.each( rules, function( rule, parameter ) {\n\t\t\trules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;\n\t\t});\n\n\t\t// clean number parameters\n\t\t$.each([ \"minlength\", \"maxlength\" ], function() {\n\t\t\tif ( rules[ this ] ) {\n\t\t\t\trules[ this ] = Number( rules[ this ] );\n\t\t\t}\n\t\t});\n\t\t$.each([ \"rangelength\", \"range\" ], function() {\n\t\t\tvar parts;\n\t\t\tif ( rules[ this ] ) {\n\t\t\t\tif ( $.isArray( rules[ this ] ) ) {\n\t\t\t\t\trules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];\n\t\t\t\t} else if ( typeof rules[ this ] === \"string\" ) {\n\t\t\t\t\tparts = rules[ this ].replace(/[\\[\\]]/g, \"\" ).split( /[\\s,]+/ );\n\t\t\t\t\trules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif ( $.validator.autoCreateRanges ) {\n\t\t\t// auto-create ranges\n\t\t\tif ( rules.min != null && rules.max != null ) {\n\t\t\t\trules.range = [ rules.min, rules.max ];\n\t\t\t\tdelete rules.min;\n\t\t\t\tdelete rules.max;\n\t\t\t}\n\t\t\tif ( rules.minlength != null && rules.maxlength != null ) {\n\t\t\t\trules.rangelength = [ rules.minlength, rules.maxlength ];\n\t\t\t\tdelete rules.minlength;\n\t\t\t\tdelete rules.maxlength;\n\t\t\t}\n\t\t}\n\n\t\treturn rules;\n\t},\n\n\t// Converts a simple string to a {string: true} rule, e.g., \"required\" to {required:true}\n\tnormalizeRule: function( data ) {\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tvar transformed = {};\n\t\t\t$.each( data.split( /\\s/ ), function() {\n\t\t\t\ttransformed[ this ] = true;\n\t\t\t});\n\t\t\tdata = transformed;\n\t\t}\n\t\treturn data;\n\t},\n\n\t// http://jqueryvalidation.org/jQuery.validator.addMethod/\n\taddMethod: function( name, method, message ) {\n\t\t$.validator.methods[ name ] = method;\n\t\t$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];\n\t\tif ( method.length < 3 ) {\n\t\t\t$.validator.addClassRules( name, $.validator.normalizeRule( name ) );\n\t\t}\n\t},\n\n\tmethods: {\n\n\t\t// http://jqueryvalidation.org/required-method/\n\t\trequired: function( value, element, param ) {\n\t\t\t// check if dependency is met\n\t\t\tif ( !this.depend( param, element ) ) {\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t}\n\t\t\tif ( element.nodeName.toLowerCase() === \"select\" ) {\n\t\t\t\t// could be an array for select-multiple or a string, both are fine this way\n\t\t\t\tvar val = $( element ).val();\n\t\t\t\treturn val && val.length > 0;\n\t\t\t}\n\t\t\tif ( this.checkable( element ) ) {\n\t\t\t\treturn this.getLength( value, element ) > 0;\n\t\t\t}\n\t\t\treturn value.length > 0;\n\t\t},\n\n\t\t// http://jqueryvalidation.org/email-method/\n\t\temail: function( value, element ) {\n\t\t\t// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address\n\t\t\t// Retrieved 2014-01-14\n\t\t\t// If you have a problem with this implementation, report a bug against the above spec\n\t\t\t// Or use custom methods to implement your own email validation\n\t\t\treturn this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/url-method/\n\t\turl: function( value, element ) {\n\n\t\t\t// Copyright (c) 2010-2013 Diego Perini, MIT licensed\n\t\t\t// https://gist.github.com/dperini/729294\n\t\t\t// see also https://mathiasbynens.be/demo/url-regex\n\t\t\t// modified to allow protocol-relative URLs\n\t\t\treturn this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})).?)(?::\\d{2,5})?(?:[/?#]\\S*)?$/i.test( value );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/date-method/\n\t\tdate: function( value, element ) {\n\t\t\treturn this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/dateISO-method/\n\t\tdateISO: function( value, element ) {\n\t\t\treturn this.optional( element ) || /^\\d{4}[\\/\\-](0?[1-9]|1[012])[\\/\\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/number-method/\n\t\tnumber: function( value, element ) {\n\t\t\treturn this.optional( element ) || /^(?:-?\\d+|-?\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/.test( value );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/digits-method/\n\t\tdigits: function( value, element ) {\n\t\t\treturn this.optional( element ) || /^\\d+$/.test( value );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/creditcard-method/\n\t\t// based on http://en.wikipedia.org/wiki/Luhn_algorithm\n\t\tcreditcard: function( value, element ) {\n\t\t\tif ( this.optional( element ) ) {\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t}\n\t\t\t// accept only spaces, digits and dashes\n\t\t\tif ( /[^0-9 \\-]+/.test( value ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar nCheck = 0,\n\t\t\t\tnDigit = 0,\n\t\t\t\tbEven = false,\n\t\t\t\tn, cDigit;\n\n\t\t\tvalue = value.replace( /\\D/g, \"\" );\n\n\t\t\t// Basing min and max length on\n\t\t\t// http://developer.ean.com/general_info/Valid_Credit_Card_Types\n\t\t\tif ( value.length < 13 || value.length > 19 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfor ( n = value.length - 1; n >= 0; n--) {\n\t\t\t\tcDigit = value.charAt( n );\n\t\t\t\tnDigit = parseInt( cDigit, 10 );\n\t\t\t\tif ( bEven ) {\n\t\t\t\t\tif ( ( nDigit *= 2 ) > 9 ) {\n\t\t\t\t\t\tnDigit -= 9;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnCheck += nDigit;\n\t\t\t\tbEven = !bEven;\n\t\t\t}\n\n\t\t\treturn ( nCheck % 10 ) === 0;\n\t\t},\n\n\t\t// http://jqueryvalidation.org/minlength-method/\n\t\tminlength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength( value, element );\n\t\t\treturn this.optional( element ) || length >= param;\n\t\t},\n\n\t\t// http://jqueryvalidation.org/maxlength-method/\n\t\tmaxlength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength( value, element );\n\t\t\treturn this.optional( element ) || length <= param;\n\t\t},\n\n\t\t// http://jqueryvalidation.org/rangelength-method/\n\t\trangelength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength( value, element );\n\t\t\treturn this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/min-method/\n\t\tmin: function( value, element, param ) {\n\t\t\treturn this.optional( element ) || value >= param;\n\t\t},\n\n\t\t// http://jqueryvalidation.org/max-method/\n\t\tmax: function( value, element, param ) {\n\t\t\treturn this.optional( element ) || value <= param;\n\t\t},\n\n\t\t// http://jqueryvalidation.org/range-method/\n\t\trange: function( value, element, param ) {\n\t\t\treturn this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/equalTo-method/\n\t\tequalTo: function( value, element, param ) {\n\t\t\t// bind to the blur event of the target in order to revalidate whenever the target field is updated\n\t\t\t// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead\n\t\t\tvar target = $( param );\n\t\t\tif ( this.settings.onfocusout ) {\n\t\t\t\ttarget.off( \".validate-equalTo\" ).on( \"blur.validate-equalTo\", function() {\n\t\t\t\t\t$( element ).valid();\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn value === target.val();\n\t\t},\n\n\t\t// http://jqueryvalidation.org/remote-method/\n\t\tremote: function( value, element, param ) {\n\t\t\tif ( this.optional( element ) ) {\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t}\n\n\t\t\tvar previous = this.previousValue( element ),\n\t\t\t\tvalidator, data;\n\n\t\t\tif (!this.settings.messages[ element.name ] ) {\n\t\t\t\tthis.settings.messages[ element.name ] = {};\n\t\t\t}\n\t\t\tprevious.originalMessage = this.settings.messages[ element.name ].remote;\n\t\t\tthis.settings.messages[ element.name ].remote = previous.message;\n\n\t\t\tparam = typeof param === \"string\" && { url: param } || param;\n\n\t\t\tif ( previous.old === value ) {\n\t\t\t\treturn previous.valid;\n\t\t\t}\n\n\t\t\tprevious.old = value;\n\t\t\tvalidator = this;\n\t\t\tthis.startRequest( element );\n\t\t\tdata = {};\n\t\t\tdata[ element.name ] = value;\n\t\t\t$.ajax( $.extend( true, {\n\t\t\t\tmode: \"abort\",\n\t\t\t\tport: \"validate\" + element.name,\n\t\t\t\tdataType: \"json\",\n\t\t\t\tdata: data,\n\t\t\t\tcontext: validator.currentForm,\n\t\t\t\tsuccess: function( response ) {\n\t\t\t\t\tvar valid = response === true || response === \"true\",\n\t\t\t\t\t\terrors, message, submitted;\n\n\t\t\t\t\tvalidator.settings.messages[ element.name ].remote = previous.originalMessage;\n\t\t\t\t\tif ( valid ) {\n\t\t\t\t\t\tsubmitted = validator.formSubmitted;\n\t\t\t\t\t\tvalidator.prepareElement( element );\n\t\t\t\t\t\tvalidator.formSubmitted = submitted;\n\t\t\t\t\t\tvalidator.successList.push( element );\n\t\t\t\t\t\tdelete validator.invalid[ element.name ];\n\t\t\t\t\t\tvalidator.showErrors();\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrors = {};\n\t\t\t\t\t\tmessage = response || validator.defaultMessage( element, \"remote\" );\n\t\t\t\t\t\terrors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;\n\t\t\t\t\t\tvalidator.invalid[ element.name ] = true;\n\t\t\t\t\t\tvalidator.showErrors( errors );\n\t\t\t\t\t}\n\t\t\t\t\tprevious.valid = valid;\n\t\t\t\t\tvalidator.stopRequest( element, valid );\n\t\t\t\t}\n\t\t\t}, param ) );\n\t\t\treturn \"pending\";\n\t\t}\n\t}\n\n});\n\n// ajax mode: abort\n// usage: $.ajax({ mode: \"abort\"[, port: \"uniqueport\"]});\n// if mode:\"abort\" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()\n\nvar pendingRequests = {},\n\tajax;\n// Use a prefilter if available (1.5+)\nif ( $.ajaxPrefilter ) {\n\t$.ajaxPrefilter(function( settings, _, xhr ) {\n\t\tvar port = settings.port;\n\t\tif ( settings.mode === \"abort\" ) {\n\t\t\tif ( pendingRequests[port] ) {\n\t\t\t\tpendingRequests[port].abort();\n\t\t\t}\n\t\t\tpendingRequests[port] = xhr;\n\t\t}\n\t});\n} else {\n\t// Proxy ajax\n\tajax = $.ajax;\n\t$.ajax = function( settings ) {\n\t\tvar mode = ( \"mode\" in settings ? settings : $.ajaxSettings ).mode,\n\t\t\tport = ( \"port\" in settings ? settings : $.ajaxSettings ).port;\n\t\tif ( mode === \"abort\" ) {\n\t\t\tif ( pendingRequests[port] ) {\n\t\t\t\tpendingRequests[port].abort();\n\t\t\t}\n\t\t\tpendingRequests[port] = ajax.apply(this, arguments);\n\t\t\treturn pendingRequests[port];\n\t\t}\n\t\treturn ajax.apply(this, arguments);\n\t};\n}\n\n}));"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/jquery-validation-unobtrusive/.bower.json",
    "content": "{\n  \"name\": \"jquery-validation-unobtrusive\",\n  \"version\": \"3.2.6\",\n  \"homepage\": \"https://github.com/aspnet/jquery-validation-unobtrusive\",\n  \"description\": \"Add-on to jQuery Validation to enable unobtrusive validation options in data-* attributes.\",\n  \"main\": [\n    \"jquery.validate.unobtrusive.js\"\n  ],\n  \"ignore\": [\n    \"**/.*\",\n    \"*.json\",\n    \"*.md\",\n    \"*.txt\",\n    \"gulpfile.js\"\n  ],\n  \"keywords\": [\n    \"jquery\",\n    \"asp.net\",\n    \"mvc\",\n    \"validation\",\n    \"unobtrusive\"\n  ],\n  \"authors\": [\n    \"Microsoft\"\n  ],\n  \"license\": \"http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git://github.com/aspnet/jquery-validation-unobtrusive.git\"\n  },\n  \"dependencies\": {\n    \"jquery-validation\": \">=1.8\",\n    \"jquery\": \">=1.8\"\n  },\n  \"_release\": \"3.2.6\",\n  \"_resolution\": {\n    \"type\": \"version\",\n    \"tag\": \"v3.2.6\",\n    \"commit\": \"13386cd1b5947d8a5d23a12b531ce3960be1eba7\"\n  },\n  \"_source\": \"git://github.com/aspnet/jquery-validation-unobtrusive.git\",\n  \"_target\": \"3.2.6\",\n  \"_originalSource\": \"jquery-validation-unobtrusive\"\n}"
  },
  {
    "path": "VirtoCommerce.Storefront/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js",
    "content": "/*!\n** Unobtrusive validation support library for jQuery and jQuery Validate\n** Copyright (C) Microsoft Corporation. All rights reserved.\n*/\n\n/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */\n/*global document: false, jQuery: false */\n\n(function ($) {\n    var $jQval = $.validator,\n        adapters,\n        data_validation = \"unobtrusiveValidation\";\n\n    function setValidationValues(options, ruleName, value) {\n        options.rules[ruleName] = value;\n        if (options.message) {\n            options.messages[ruleName] = options.message;\n        }\n    }\n\n    function splitAndTrim(value) {\n        return value.replace(/^\\s+|\\s+$/g, \"\").split(/\\s*,\\s*/g);\n    }\n\n    function escapeAttributeValue(value) {\n        // As mentioned on http://api.jquery.com/category/selectors/\n        return value.replace(/([!\"#$%&'()*+,./:;<=>?@\\[\\\\\\]^`{|}~])/g, \"\\\\$1\");\n    }\n\n    function getModelPrefix(fieldName) {\n        return fieldName.substr(0, fieldName.lastIndexOf(\".\") + 1);\n    }\n\n    function appendModelPrefix(value, prefix) {\n        if (value.indexOf(\"*.\") === 0) {\n            value = value.replace(\"*.\", prefix);\n        }\n        return value;\n    }\n\n    function onError(error, inputElement) {  // 'this' is the form element\n        var container = $(this).find(\"[data-valmsg-for='\" + escapeAttributeValue(inputElement[0].name) + \"']\"),\n            replaceAttrValue = container.attr(\"data-valmsg-replace\"),\n            replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null;\n\n        container.removeClass(\"field-validation-valid\").addClass(\"field-validation-error\");\n        error.data(\"unobtrusiveContainer\", container);\n\n        if (replace) {\n            container.empty();\n            error.removeClass(\"input-validation-error\").appendTo(container);\n        }\n        else {\n            error.hide();\n        }\n    }\n\n    function onErrors(event, validator) {  // 'this' is the form element\n        var container = $(this).find(\"[data-valmsg-summary=true]\"),\n            list = container.find(\"ul\");\n\n        if (list && list.length && validator.errorList.length) {\n            list.empty();\n            container.addClass(\"validation-summary-errors\").removeClass(\"validation-summary-valid\");\n\n            $.each(validator.errorList, function () {\n                $(\"<li />\").html(this.message).appendTo(list);\n            });\n        }\n    }\n\n    function onSuccess(error) {  // 'this' is the form element\n        var container = error.data(\"unobtrusiveContainer\");\n\n        if (container) {\n            var replaceAttrValue = container.attr(\"data-valmsg-replace\"),\n                replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;\n\n            container.addClass(\"field-validation-valid\").removeClass(\"field-validation-error\");\n            error.removeData(\"unobtrusiveContainer\");\n\n            if (replace) {\n                container.empty();\n            }\n        }\n    }\n\n    function onReset(event) {  // 'this' is the form element\n        var $form = $(this),\n            key = '__jquery_unobtrusive_validation_form_reset';\n        if ($form.data(key)) {\n            return;\n        }\n        // Set a flag that indicates we're currently resetting the form.\n        $form.data(key, true);\n        try {\n            $form.data(\"validator\").resetForm();\n        } finally {\n            $form.removeData(key);\n        }\n\n        $form.find(\".validation-summary-errors\")\n            .addClass(\"validation-summary-valid\")\n            .removeClass(\"validation-summary-errors\");\n        $form.find(\".field-validation-error\")\n            .addClass(\"field-validation-valid\")\n            .removeClass(\"field-validation-error\")\n            .removeData(\"unobtrusiveContainer\")\n            .find(\">*\")  // If we were using valmsg-replace, get the underlying error\n                .removeData(\"unobtrusiveContainer\");\n    }\n\n    function validationInfo(form) {\n        var $form = $(form),\n            result = $form.data(data_validation),\n            onResetProxy = $.proxy(onReset, form),\n            defaultOptions = $jQval.unobtrusive.options || {},\n            execInContext = function (name, args) {\n                var func = defaultOptions[name];\n                func && $.isFunction(func) && func.apply(form, args);\n            }\n\n        if (!result) {\n            result = {\n                options: {  // options structure passed to jQuery Validate's validate() method\n                    errorClass: defaultOptions.errorClass || \"input-validation-error\",\n                    errorElement: defaultOptions.errorElement || \"span\",\n                    errorPlacement: function () {\n                        onError.apply(form, arguments);\n                        execInContext(\"errorPlacement\", arguments);\n                    },\n                    invalidHandler: function () {\n                        onErrors.apply(form, arguments);\n                        execInContext(\"invalidHandler\", arguments);\n                    },\n                    messages: {},\n                    rules: {},\n                    success: function () {\n                        onSuccess.apply(form, arguments);\n                        execInContext(\"success\", arguments);\n                    }\n                },\n                attachValidation: function () {\n                    $form\n                        .off(\"reset.\" + data_validation, onResetProxy)\n                        .on(\"reset.\" + data_validation, onResetProxy)\n                        .validate(this.options);\n                },\n                validate: function () {  // a validation function that is called by unobtrusive Ajax\n                    $form.validate();\n                    return $form.valid();\n                }\n            };\n            $form.data(data_validation, result);\n        }\n\n        return result;\n    }\n\n    $jQval.unobtrusive = {\n        adapters: [],\n\n        parseElement: function (element, skipAttach) {\n            /// <summary>\n            /// Parses a single HTML element for unobtrusive validation attributes.\n            /// </summary>\n            /// <param name=\"element\" domElement=\"true\">The HTML element to be parsed.</param>\n            /// <param name=\"skipAttach\" type=\"Boolean\">[Optional] true to skip attaching the\n            /// validation to the form. If parsing just this single element, you should specify true.\n            /// If parsing several elements, you should specify false, and manually attach the validation\n            /// to the form when you are finished. The default is false.</param>\n            var $element = $(element),\n                form = $element.parents(\"form\")[0],\n                valInfo, rules, messages;\n\n            if (!form) {  // Cannot do client-side validation without a form\n                return;\n            }\n\n            valInfo = validationInfo(form);\n            valInfo.options.rules[element.name] = rules = {};\n            valInfo.options.messages[element.name] = messages = {};\n\n            $.each(this.adapters, function () {\n                var prefix = \"data-val-\" + this.name,\n                    message = $element.attr(prefix),\n                    paramValues = {};\n\n                if (message !== undefined) {  // Compare against undefined, because an empty message is legal (and falsy)\n                    prefix += \"-\";\n\n                    $.each(this.params, function () {\n                        paramValues[this] = $element.attr(prefix + this);\n                    });\n\n                    this.adapt({\n                        element: element,\n                        form: form,\n                        message: message,\n                        params: paramValues,\n                        rules: rules,\n                        messages: messages\n                    });\n                }\n            });\n\n            $.extend(rules, { \"__dummy__\": true });\n\n            if (!skipAttach) {\n                valInfo.attachValidation();\n            }\n        },\n\n        parse: function (selector) {\n            /// <summary>\n            /// Parses all the HTML elements in the specified selector. It looks for input elements decorated\n            /// with the [data-val=true] attribute value and enables validation according to the data-val-*\n            /// attribute values.\n            /// </summary>\n            /// <param name=\"selector\" type=\"String\">Any valid jQuery selector.</param>\n\n            // $forms includes all forms in selector's DOM hierarchy (parent, children and self) that have at least one\n            // element with data-val=true\n            var $selector = $(selector),\n                $forms = $selector.parents()\n                                  .addBack()\n                                  .filter(\"form\")\n                                  .add($selector.find(\"form\"))\n                                  .has(\"[data-val=true]\");\n\n            $selector.find(\"[data-val=true]\").each(function () {\n                $jQval.unobtrusive.parseElement(this, true);\n            });\n\n            $forms.each(function () {\n                var info = validationInfo(this);\n                if (info) {\n                    info.attachValidation();\n                }\n            });\n        }\n    };\n\n    adapters = $jQval.unobtrusive.adapters;\n\n    adapters.add = function (adapterName, params, fn) {\n        /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation.</summary>\n        /// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\n        /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\n        /// <param name=\"params\" type=\"Array\" optional=\"true\">[Optional] An array of parameter names (strings) that will\n        /// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and\n        /// mmmm is the parameter name).</param>\n        /// <param name=\"fn\" type=\"Function\">The function to call, which adapts the values from the HTML\n        /// attributes into jQuery Validate rules and/or messages.</param>\n        /// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\n        if (!fn) {  // Called with no params, just a function\n            fn = params;\n            params = [];\n        }\n        this.push({ name: adapterName, params: params, adapt: fn });\n        return this;\n    };\n\n    adapters.addBool = function (adapterName, ruleName) {\n        /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\n        /// the jQuery Validate validation rule has no parameter values.</summary>\n        /// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\n        /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\n        /// <param name=\"ruleName\" type=\"String\" optional=\"true\">[Optional] The name of the jQuery Validate rule. If not provided, the value\n        /// of adapterName will be used instead.</param>\n        /// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\n        return this.add(adapterName, function (options) {\n            setValidationValues(options, ruleName || adapterName, true);\n        });\n    };\n\n    adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) {\n        /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\n        /// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and\n        /// one for min-and-max). The HTML parameters are expected to be named -min and -max.</summary>\n        /// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\n        /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\n        /// <param name=\"minRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you only\n        /// have a minimum value.</param>\n        /// <param name=\"maxRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you only\n        /// have a maximum value.</param>\n        /// <param name=\"minMaxRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you\n        /// have both a minimum and maximum value.</param>\n        /// <param name=\"minAttribute\" type=\"String\" optional=\"true\">[Optional] The name of the HTML attribute that\n        /// contains the minimum value. The default is \"min\".</param>\n        /// <param name=\"maxAttribute\" type=\"String\" optional=\"true\">[Optional] The name of the HTML attribute that\n        /// contains the maximum value. The default is \"max\".</param>\n        /// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\n        return this.add(adapterName, [minAttribute || \"min\", maxAttribute || \"max\"], function (options) {\n            var min = options.params.min,\n                max = options.params.max;\n\n            if (min && max) {\n                setValidationValues(options, minMaxRuleName, [min, max]);\n            }\n            else if (min) {\n                setValidationValues(options, minRuleName, min);\n            }\n            else if (max) {\n                setValidationValues(options, maxRuleName, max);\n            }\n        });\n    };\n\n    adapters.addSingleVal = function (adapterName, attribute, ruleName) {\n        /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\n        /// the jQuery Validate validation rule has a single value.</summary>\n        /// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\n        /// in the data-val-nnnn HTML attribute(where nnnn is the adapter name).</param>\n        /// <param name=\"attribute\" type=\"String\">[Optional] The name of the HTML attribute that contains the value.\n        /// The default is \"val\".</param>\n        /// <param name=\"ruleName\" type=\"String\" optional=\"true\">[Optional] The name of the jQuery Validate rule. If not provided, the value\n        /// of adapterName will be used instead.</param>\n        /// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\n        return this.add(adapterName, [attribute || \"val\"], function (options) {\n            setValidationValues(options, ruleName || adapterName, options.params[attribute]);\n        });\n    };\n\n    $jQval.addMethod(\"__dummy__\", function (value, element, params) {\n        return true;\n    });\n\n    $jQval.addMethod(\"regex\", function (value, element, params) {\n        var match;\n        if (this.optional(element)) {\n            return true;\n        }\n\n        match = new RegExp(params).exec(value);\n        return (match && (match.index === 0) && (match[0].length === value.length));\n    });\n\n    $jQval.addMethod(\"nonalphamin\", function (value, element, nonalphamin) {\n        var match;\n        if (nonalphamin) {\n            match = value.match(/\\W/g);\n            match = match && match.length >= nonalphamin;\n        }\n        return match;\n    });\n\n    if ($jQval.methods.extension) {\n        adapters.addSingleVal(\"accept\", \"mimtype\");\n        adapters.addSingleVal(\"extension\", \"extension\");\n    } else {\n        // for backward compatibility, when the 'extension' validation method does not exist, such as with versions\n        // of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for\n        // validating the extension, and ignore mime-type validations as they are not supported.\n        adapters.addSingleVal(\"extension\", \"extension\", \"accept\");\n    }\n\n    adapters.addSingleVal(\"regex\", \"pattern\");\n    adapters.addBool(\"creditcard\").addBool(\"date\").addBool(\"digits\").addBool(\"email\").addBool(\"number\").addBool(\"url\");\n    adapters.addMinMax(\"length\", \"minlength\", \"maxlength\", \"rangelength\").addMinMax(\"range\", \"min\", \"max\", \"range\");\n    adapters.addMinMax(\"minlength\", \"minlength\").addMinMax(\"maxlength\", \"minlength\", \"maxlength\");\n    adapters.add(\"equalto\", [\"other\"], function (options) {\n        var prefix = getModelPrefix(options.element.name),\n            other = options.params.other,\n            fullOtherName = appendModelPrefix(other, prefix),\n            element = $(options.form).find(\":input\").filter(\"[name='\" + escapeAttributeValue(fullOtherName) + \"']\")[0];\n\n        setValidationValues(options, \"equalTo\", element);\n    });\n    adapters.add(\"required\", function (options) {\n        // jQuery Validate equates \"required\" with \"mandatory\" for checkbox elements\n        if (options.element.tagName.toUpperCase() !== \"INPUT\" || options.element.type.toUpperCase() !== \"CHECKBOX\") {\n            setValidationValues(options, \"required\", true);\n        }\n    });\n    adapters.add(\"remote\", [\"url\", \"type\", \"additionalfields\"], function (options) {\n        var value = {\n            url: options.params.url,\n            type: options.params.type || \"GET\",\n            data: {}\n        },\n            prefix = getModelPrefix(options.element.name);\n\n        $.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) {\n            var paramName = appendModelPrefix(fieldName, prefix);\n            value.data[paramName] = function () {\n                var field = $(options.form).find(\":input\").filter(\"[name='\" + escapeAttributeValue(paramName) + \"']\");\n                // For checkboxes and radio buttons, only pick up values from checked fields.\n                if (field.is(\":checkbox\")) {\n                    return field.filter(\":checked\").val() || field.filter(\":hidden\").val() || '';\n                }\n                else if (field.is(\":radio\")) {\n                    return field.filter(\":checked\").val() || '';\n                }\n                return field.val();\n            };\n        });\n\n        setValidationValues(options, \"remote\", value);\n    });\n    adapters.add(\"password\", [\"min\", \"nonalphamin\", \"regex\"], function (options) {\n        if (options.params.min) {\n            setValidationValues(options, \"minlength\", options.params.min);\n        }\n        if (options.params.nonalphamin) {\n            setValidationValues(options, \"nonalphamin\", options.params.nonalphamin);\n        }\n        if (options.params.regex) {\n            setValidationValues(options, \"regex\", options.params.regex);\n        }\n    });\n\n    $(function () {\n        $jQval.unobtrusive.parse(document);\n    });\n}(jQuery));"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Address.cs",
    "content": "using System.Collections.Generic;\nusing System.ComponentModel.DataAnnotations;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Converters;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public partial class Address : ValueObject\n    {\n        [JsonConverter(typeof(StringEnumConverter))]\n        public AddressType Type { get; set; }\n        public string Key { get; set; }\n        public string Name { get; set; }\n\n        public string Organization { get; set; }\n        public string CountryCode { get; set; }\n\n        public string CountryName { get; set; }\n        public string City { get; set; }\n        public string PostalCode { get; set; }\n        public string Zip { get; set; }\n        public string Line1 { get; set; }\n\n        public string Line2 { get; set; }\n\n\n        public string RegionId { get; set; }\n\n        public string RegionName { get; set; }\n        public string FirstName { get; set; }\n        public string MiddleName { get; set; }\n        public string LastName { get; set; }\n        [Phone]\n        public string Phone { get; set; }\n        [EmailAddress]\n        public string Email { get; set; }\n\n        #region Shopify model compatible properties\n        public string Id => Key;\n        [JsonIgnore]\n        public string Company => Organization;\n        [JsonIgnore]\n        public string Country => CountryName;\n        [JsonIgnore]\n        public string Address1 => Line1;\n        [JsonIgnore]\n        public string Address2 => Line2;\n        [JsonIgnore]\n        public string Street\n        {\n            get\n            {\n                return string.Join(\", \", Address1, Address2).Trim(',', ' ');\n            }\n        }\n        [JsonIgnore]\n        public string ProvinceCode => RegionId;\n        [JsonIgnore]\n        public string Province => RegionName;\n        #endregion\n\n        public override string ToString()\n        {\n            var retVal = string.Join(\" \", FirstName, LastName, Organization, Line1, City, RegionName, PostalCode, CountryName);\n            return retVal;\n        }\n\n\n        protected override IEnumerable<object> GetEqualityComponents()\n        {\n            //Key and Name properties don't participate in equality\n            yield return Type;\n            yield return Organization;\n            yield return CountryCode;\n            yield return CountryName;\n            yield return PostalCode;\n            yield return Zip;\n            yield return Line1;\n            yield return Line2;\n            yield return RegionId;\n            yield return RegionName;\n            yield return FirstName;\n            yield return MiddleName;\n            yield return LastName;\n            yield return Phone;\n            yield return Email;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/AddressType.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    [Flags]\n    public enum AddressType\n    {\n        Undefined = 0,\n        Billing = 1,\n        Shipping = 2,\n        BillingAndShipping = Billing | Shipping\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/AmountType.cs",
    "content": "namespace VirtoCommerce.Storefront.Model\n{\n    public enum AmountType\n    {\n        Absolute,\n        Relative\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Attachment.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public partial class Attachment\n    {\n        public string Name { get; set; }\n\n        public string Url { get; set; }\n\n        public string MimeType { get; set; }\n\n        public long? Size { get; set; }\n\n        public DateTime? CreatedDate { get; set; }\n\n        public DateTime? ModifiedDate { get; set; }\n\n        public string CreatedBy { get; set; }\n\n        public string ModifiedBy { get; set; }\n\n        public string Id { get; set; }\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/BankCardInfo.cs",
    "content": "namespace VirtoCommerce.Storefront.Model\n{\n    /// <summary>\n    /// Represents bank card information\n    /// </summary>\n    public partial class BankCardInfo\n    {\n        /// <summary>\n        /// Gets or sets bank card number\n        /// </summary>\n        public string BankCardNumber { get; set; }\n\n        /// <summary>\n        /// Gets or sets bank card type\n        /// </summary>\n        public string BankCardType { get; set; }\n\n        /// <summary>\n        /// Gets or sets bank card expiration month\n        /// </summary>\n        public int? BankCardMonth { get; set; }\n\n        /// <summary>\n        /// Gets or sets bank card expiration year\n        /// </summary>\n        public int? BankCardYear { get; set; }\n\n        /// <summary>\n        /// Gets or sets bank card CVV\n        /// </summary>\n        public string BankCardCVV2 { get; set; }\n\n        /// <summary>\n        /// Gets or sets the cardholder name\n        /// </summary>\n        public string CardholderName { get; set; }\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Caching/IStorefrontMemoryCache.cs",
    "content": "using Microsoft.Extensions.Caching.Memory;\n\nnamespace VirtoCommerce.Storefront.Model.Caching\n{\n    // This abstraction is used as a substitute for built-in IMemoryCache as a custom way to handle caching logic, impl of it should work as a wrapper\n    public interface IStorefrontMemoryCache : IMemoryCache\n    {\n        MemoryCacheEntryOptions GetDefaultCacheEntryOptions();\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/AnonymousComparer.cs",
    "content": "/*--------------------------------------------------------------------------\n* AnonymousComparer - lambda compare selector for Linq\n* ver 1.3.0.0 (Oct. 18th, 2010)\n*\n* created and maintained by neuecc <ils@neue.cc>\n* licensed under Microsoft Public License(Ms-PL)\n* http://neue.cc/\n* http://linqcomparer.codeplex.com/\n*--------------------------------------------------------------------------*/\n\nusing System;\nusing System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class AnonymousComparer\n    {\n        #region IComparer<T>\n\n        private class Comparer<T> : IComparer<T>\n        {\n            private readonly Func<T, T, int> compare;\n\n            public Comparer(Func<T, T, int> compare)\n            {\n                this.compare = compare;\n            }\n\n            public int Compare(T x, T y)\n            {\n                return compare(x, y);\n            }\n        }\n\n        /// <summary>Example:AnonymousComparer.Create&lt;int&gt;((x, y) => y - x)</summary>\n        public static IComparer<T> Create<T>(Func<T, T, int> compare)\n        {\n            if (compare == null)\n            {\n                throw new ArgumentNullException(\"compare\");\n            }\n\n            return new Comparer<T>(compare);\n        }\n\n        #endregion\n\n        #region IEqualityComparer<T>\n\n        /// <summary>Example:AnonymousComparer.Create((MyClass mc) => mc.MyProperty)</summary>\n        public static IEqualityComparer<T> Create<T, TKey>(Func<T, TKey> compareKeySelector)\n        {\n            if (compareKeySelector == null)\n            {\n                throw new ArgumentNullException(\"compareKeySelector\");\n            }\n\n            return new EqualityComparer<T>(\n                (x, y) =>\n                {\n                    if (object.ReferenceEquals(x, y))\n                    {\n                        return true;\n                    }\n\n                    if (x == null || y == null)\n                    {\n                        return false;\n                    }\n\n                    return compareKeySelector(x).Equals(compareKeySelector(y));\n                },\n                obj =>\n                {\n                    if (obj == null)\n                    {\n                        return 0;\n                    }\n\n                    var retVal = compareKeySelector(obj);\n\n                    if (retVal == null)\n                    {\n                        return 0;\n                    }\n                    return retVal.GetHashCode();\n                });\n        }\n\n        public static IEqualityComparer<T> Create<T>(Func<T, T, bool> equals, Func<T, int> getHashCode)\n        {\n            if (equals == null)\n            {\n                throw new ArgumentNullException(\"equals\");\n            }\n\n            if (getHashCode == null)\n            {\n                throw new ArgumentNullException(\"getHashCode\");\n            }\n\n            return new EqualityComparer<T>(equals, getHashCode);\n        }\n\n        private class EqualityComparer<T> : IEqualityComparer<T>\n        {\n            private readonly Func<T, T, bool> equals;\n            private readonly Func<T, int> getHashCode;\n\n            public EqualityComparer(Func<T, T, bool> equals, Func<T, int> getHashCode)\n            {\n                this.equals = equals;\n                this.getHashCode = getHashCode;\n            }\n\n            public bool Equals(T x, T y)\n            {\n                return equals(x, y);\n            }\n\n            public int GetHashCode(T obj)\n            {\n                return getHashCode(obj);\n            }\n        }\n\n        #endregion\n\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/ArrayExtensions.cs",
    "content": "using System.Text;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class ArrayExtensions\n    {\n        public static string ToHex(this byte[] bytes, bool upperCase)\n        {\n            var result = new StringBuilder(bytes.Length * 2);\n\n            for (var i = 0; i < bytes.Length; i++)\n            {\n                result.Append(bytes[i].ToString(upperCase ? \"X2\" : \"x2\"));\n            }\n\n            return result.ToString();\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/AsyncLock.cs",
    "content": "using System.Collections.Concurrent;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n\n    public static class AsyncLock\n    {\n        private static readonly ConcurrentDictionary<string, Nito.AsyncEx.AsyncLock> _lockMap = new ConcurrentDictionary<string, Nito.AsyncEx.AsyncLock>();\n\n        public static Nito.AsyncEx.AsyncLock GetLockByKey(string key)\n        {\n            return _lockMap.GetOrAdd(key, (x) => new Nito.AsyncEx.AsyncLock());\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Breadcrumb.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Common\n{\n    public abstract class Breadcrumb : ValueObject\n    {\n        protected Breadcrumb(string type)\n        {\n            TypeName = type;\n        }\n        public string TypeName { get; private set; }\n        public virtual string Title { get; set; }\n        public virtual string SeoPath { get; set; }\n        public virtual string Url { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Bus/IHandlerRegistrar.cs",
    "content": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing VirtoCommerce.Storefront.Model.Common.Messages;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Bus\n{\n    public interface IHandlerRegistrar\n    {\n        void RegisterHandler<T>(Func<T, CancellationToken, Task> handler) where T : class, IMessage;\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Bus/InProcessBus.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing VirtoCommerce.Storefront.Model.Common.Events;\nusing VirtoCommerce.Storefront.Model.Common.Messages;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Bus\n{\n    public class InProcessBus : IEventPublisher, IHandlerRegistrar\n    {\n        private readonly Dictionary<Type, List<Func<IMessage, CancellationToken, Task>>> _routes = new Dictionary<Type, List<Func<IMessage, CancellationToken, Task>>>();\n\n        public void RegisterHandler<T>(Func<T, CancellationToken, Task> handler) where T : class, IMessage\n        {\n            if (!_routes.TryGetValue(typeof(T), out var handlers))\n            {\n                handlers = new List<Func<IMessage, CancellationToken, Task>>();\n                _routes.Add(typeof(T), handlers);\n            }\n            handlers.Add((message, token) => handler((T)message, token));\n        }\n\n        public async Task Publish<T>(T @event, CancellationToken cancellationToken = default(CancellationToken)) where T : class, IEvent\n        {\n            if (_routes.TryGetValue(@event.GetType(), out var handlers))\n            {\n                await Task.WhenAll(handlers.Select(handler => handler(@event, cancellationToken)));\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Caching/CacheCancellableTokensRegistry.cs",
    "content": "using System;\nusing System.Collections.Concurrent;\nusing System.Threading;\nusing Microsoft.Extensions.Primitives;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Caching\n{\n    /// <summary>\n    /// Stores all cancellation tokens that are associated for cached entries\n    /// </summary>\n    public static class CacheCancellableTokensRegistry\n    {\n        private static readonly ConcurrentDictionary<string, CancellationTokenSource> _tokensDict = new ConcurrentDictionary<string, CancellationTokenSource>();\n        // Events are not used intentionally to restrict usage by multiple subscribers\n        public static Action<TokenCancelledEventArgs> OnTokenCancelled { get; set; }\n\n        public static IChangeToken CreateChangeToken(string tokenKey)\n        {\n            var tokenSource = _tokensDict.GetOrAdd(tokenKey, _ => new CancellationTokenSource());\n            return new CancellationChangeToken(tokenSource.Token);\n        }\n\n        public static bool TryCancelToken(string tokenKey, bool raiseEvent = true)\n        {\n            var result = _tokensDict.TryRemove(tokenKey, out var token);\n            if (result)\n            {\n                token.Cancel();\n                token.Dispose();\n            }\n            if (raiseEvent)\n            {\n                //Notify even if no token found for the key.\n                //It is important for cached data consistency when scale-out configuration is used, because other instances may contain cached entries with this key\n                TriggerOnCancel(tokenKey);\n            }\n            return result;\n        }\n\n        private static void TriggerOnCancel(string tokenKey)\n        {\n            OnTokenCancelled?.Invoke(new TokenCancelledEventArgs(tokenKey));\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Caching/CacheKey.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Caching\n{\n    public static class CacheKey\n    {\n        public static string With(params string[] keys)\n        {\n            return string.Join(\"-\", keys);\n        }\n\n        public static string With(Type ownerType, params string[] keys)\n        {\n            return With($\"{ownerType.GetCacheKey()}:{string.Join(\"-\", keys)}\");\n        }\n\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Caching/CancellableCacheRegion.cs",
    "content": "using System;\nusing Microsoft.Extensions.Primitives;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Caching\n{\n    /// <summary>\n    /// Represents strongly typed cache region containing cancellation token for a concrete cache region type\n    /// </summary>\n    /// <typeparam name=\"T\"></typeparam>\n    public class CancellableCacheRegion<T>\n    {\n        private static readonly string _regionName = typeof(T).Name;\n\n        protected CancellableCacheRegion()\n        {\n        }\n\n        public static IChangeToken CreateChangeTokenForKey(string key)\n        {\n            if (key is null)\n            {\n                throw new ArgumentNullException(nameof(key));\n            }\n            return new CompositeChangeToken(new[] { CreateChangeToken(), CacheCancellableTokensRegistry.CreateChangeToken(GenerateRegionTokenKey(key)) });\n        }\n\n        public static IChangeToken CreateChangeToken()\n        {\n            return CacheCancellableTokensRegistry.CreateChangeToken(GenerateRegionTokenKey());\n        }\n\n        public static void ExpireTokenForKey(string key)\n        {\n            if (!(key is null))\n            {\n                CacheCancellableTokensRegistry.TryCancelToken(GenerateRegionTokenKey(key));\n            }\n        }\n\n        public static void ExpireRegion()\n        {\n            CacheCancellableTokensRegistry.TryCancelToken(GenerateRegionTokenKey());\n        }\n\n        private static string GenerateRegionTokenKey(string key = null)\n        {\n            if (!(key is null))\n            {\n                return $\"{_regionName}:{key}\";\n            }\n            return $\"{_regionName}\";\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Caching/GlobalCacheRegion.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Common.Caching\n{\n    public class GlobalCacheRegion : CancellableCacheRegion<GlobalCacheRegion>\n    {\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Caching/ICacheKey.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Common\n{\n    public interface ICacheKey\n    {\n        string GetCacheKey();\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Caching/MemoryCacheExtensions.cs",
    "content": "using System;\nusing System.Collections.Concurrent;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.Caching.Memory;\nusing VirtoCommerce.Storefront.Model.Caching;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Caching\n{\n    public static class MemoryCacheExtensions\n    {\n        private static readonly ConcurrentDictionary<string, object> _lockLookup = new ConcurrentDictionary<string, object>();\n        public static async Task<TItem> GetOrCreateExclusiveAsync<TItem>(this IMemoryCache cache, string key, Func<MemoryCacheEntryOptions, Task<TItem>> factory, bool cacheNullValue = true)\n        {\n            if (!cache.TryGetValue(key, out var result))\n            {\n                using (await AsyncLock.GetLockByKey(key).LockAsync())\n                {\n                    if (!cache.TryGetValue(key, out result))\n                    {\n                        var options = cache is IStorefrontMemoryCache storefrontMemoryCache ? storefrontMemoryCache.GetDefaultCacheEntryOptions() : new MemoryCacheEntryOptions();\n                        result = await factory(options);\n                        if (result != null || cacheNullValue)\n                        {\n                            cache.Set(key, result, options);\n                        }\n                    }\n                }\n            }\n            return (TItem)result;\n        }\n\n        public static TItem GetOrCreateExclusive<TItem>(this IMemoryCache cache, string key, Func<MemoryCacheEntryOptions, TItem> factory, bool cacheNullValue = true)\n        {\n            if (!cache.TryGetValue(key, out var result))\n            {\n                lock (_lockLookup.GetOrAdd(key, new object()))\n                {\n                    if (!cache.TryGetValue(key, out result))\n                    {\n                        var options = cache is IStorefrontMemoryCache storefrontMemoryCache ? storefrontMemoryCache.GetDefaultCacheEntryOptions() : new MemoryCacheEntryOptions();\n                        result = factory(options);\n                        if (result != null || cacheNullValue)\n                        {\n                            cache.Set(key, result, options);\n                        }\n                    }\n                }\n            }\n            return (TItem)result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Caching/TokenCancelledEventArgs.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Caching\n{\n    public sealed class TokenCancelledEventArgs : EventArgs\n    {\n        public TokenCancelledEventArgs(string tokenKey)\n        {\n            TokenKey = tokenKey;\n        }\n\n        public string TokenKey { get; }\n        public override string ToString()\n        {\n            return $\"{TokenKey}\";\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/CollectionExtensions.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    /// <summary>\n    /// Class that provides extension methods to Collection\n    /// </summary>\n    public static class CollectionExtensions\n    {\n        /// <summary>\n        /// Add a range of items to a collection.\n        /// </summary>\n        /// <typeparam name=\"T\">Type of objects within the collection.</typeparam>\n        /// <param name=\"collection\">The collection to add items to.</param>\n        /// <param name=\"items\">The items to add to the collection.</param>\n        /// <returns>The collection.</returns>\n        /// <exception cref=\"System.ArgumentNullException\">An <see cref=\"System.ArgumentNullException\"/> is thrown if <paramref name=\"collection\"/> or <paramref name=\"items\"/> is <see langword=\"null\"/>.</exception>\n\t\tpublic static ICollection<T> AddRange<T>(this ICollection<T> collection, IEnumerable<T> items)\n        {\n            if (collection == null)\n            {\n                throw new System.ArgumentNullException(\"collection\");\n            }\n\n            if (items == null)\n            {\n                throw new System.ArgumentNullException(\"items\");\n            }\n\n            foreach (var each in items)\n            {\n                collection.Add(each);\n            }\n\n            return collection;\n        }\n\n        public static void AddDistinct<T>(this ICollection<T> obj, params T[] items)\n        {\n            AddDistinct(obj, null, items);\n        }\n\n        public static void AddDistinct<T>(this ICollection<T> obj, IEqualityComparer<T> comparer, params T[] items)\n        {\n            if (obj == null)\n            {\n                throw new ArgumentNullException(\"obj\");\n            }\n\n            if (items == null)\n            {\n                return;\n            }\n\n            foreach (var item in items)\n            {\n                var contains = comparer != null ? obj.Contains(item, comparer) : obj.Contains(item);\n\n                if (!contains)\n                {\n                    obj.Add(item);\n                }\n            }\n        }\n\n\n        public static void Replace<T>(this ICollection<T> obj, IEnumerable<T> newItems)\n        {\n            if (obj == null)\n            {\n                throw new ArgumentNullException(\"obj\");\n            }\n\n            obj.Clear();\n            obj.AddRange(newItems);\n        }\n\n        public static void Patch<T>(this ICollection<T> source, ICollection<T> target, Action<T, T> patch)\n        {\n            source.Patch(target, EqualityComparer<T>.Default, patch);\n        }\n\n\n        public static void Patch<T>(this ICollection<T> source, ICollection<T> target, IEqualityComparer<T> comparer, Action<T, T> patch)\n        {\n            void PatchAction(EntryState state, T x, T y)\n            {\n                if (state == EntryState.Modified)\n                {\n                    patch(x, y);\n                }\n                else if (state == EntryState.Added)\n                {\n                    target.Add(x);\n                }\n                else if (state == EntryState.Deleted)\n                {\n                    target.Remove(x);\n                }\n            }\n\n            source.CompareTo(target, comparer, PatchAction);\n        }\n\n        public static void CompareTo<T>(this ICollection<T> source, ICollection<T> target, IEqualityComparer<T> comparer, Action<EntryState, T, T> action)\n        {\n            //Change\n            foreach (var sourceItem in source)\n            {\n                var targetItem = target.FirstOrDefault(x => comparer.Equals(x, sourceItem));\n                if (targetItem != null && !targetItem.Equals(default(T)))\n                {\n                    action(EntryState.Modified, sourceItem, targetItem);\n                }\n            }\n            //Add\n            foreach (var newItem in source.Except(target, comparer))\n            {\n                action(EntryState.Added, newItem, newItem);\n            }\n            //Remove\n            foreach (var removedItem in target.Except(source, comparer).ToArray())\n            {\n                action(EntryState.Deleted, removedItem, removedItem);\n            }\n        }\n\n\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/DefaultableDictionary.cs",
    "content": "using System.Collections;\nusing System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class DefaultableDictionaryExtensions\n    {\n        public static IDictionary<TKey, TValue> WithDefaultValue<TValue, TKey>(this IDictionary<TKey, TValue> dictionary, TValue defaultValue)\n        {\n            return new DefaultableDictionary<TKey, TValue>(dictionary, defaultValue);\n        }\n    }\n\n    /// <summary>\n    /// Represent dictionary  returning a default value if the key does not exist \n    /// </summary>\n    public class DefaultableDictionary<TKey, TValue> : IDictionary<TKey, TValue>\n    {\n        private readonly IDictionary<TKey, TValue> _dictionary;\n        private readonly TValue _defaultValue;\n\n        public DefaultableDictionary(IDictionary<TKey, TValue> dictionary, TValue defaultValue)\n        {\n            _dictionary = dictionary;\n            _defaultValue = defaultValue;\n        }\n\n        public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()\n        {\n            return _dictionary.GetEnumerator();\n        }\n\n        IEnumerator IEnumerable.GetEnumerator()\n        {\n            return GetEnumerator();\n        }\n\n        public void Add(KeyValuePair<TKey, TValue> item)\n        {\n            _dictionary.Add(item);\n        }\n\n        public void Clear()\n        {\n            _dictionary.Clear();\n        }\n\n        public bool Contains(KeyValuePair<TKey, TValue> item)\n        {\n            return _dictionary.Contains(item);\n        }\n\n        public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)\n        {\n            _dictionary.CopyTo(array, arrayIndex);\n        }\n\n        public bool Remove(KeyValuePair<TKey, TValue> item)\n        {\n            return _dictionary.Remove(item);\n        }\n\n        public int Count\n        {\n            get { return _dictionary.Count; }\n        }\n\n        public bool IsReadOnly\n        {\n            get { return _dictionary.IsReadOnly; }\n        }\n\n        public bool ContainsKey(TKey key)\n        {\n            return _dictionary.ContainsKey(key);\n        }\n\n        public void Add(TKey key, TValue value)\n        {\n            _dictionary.Add(key, value);\n        }\n\n        public bool Remove(TKey key)\n        {\n            return _dictionary.Remove(key);\n        }\n\n        public bool TryGetValue(TKey key, out TValue value)\n        {\n            if (!_dictionary.TryGetValue(key, out value))\n            {\n                value = _defaultValue;\n            }\n\n            return true;\n        }\n\n        public TValue this[TKey key]\n        {\n            get\n            {\n                if (!_dictionary.TryGetValue(key, out var result))\n                {\n                    result = _defaultValue;\n                }\n                return result;\n            }\n\n            set { _dictionary[key] = value; }\n        }\n\n        public ICollection<TKey> Keys\n        {\n            get { return _dictionary.Keys; }\n        }\n\n        public ICollection<TValue> Values\n        {\n            get\n            {\n                var values = new List<TValue>(_dictionary.Values) { _defaultValue };\n                return values;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/DynamicPropertyExtension.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class DynamicPropertiesExtensions\n    {\n        public static string GetDynamicPropertyValue(this IEnumerable<DynamicProperty> properties, string propertyName, Language language = null)\n        {\n            string retVal = null;\n\n            language ??= Language.InvariantLanguage;\n\n            if (properties != null)\n            {\n                var property = properties.FirstOrDefault(v => string.Equals(v.Name, propertyName, StringComparison.OrdinalIgnoreCase) && v.Values != null);\n\n                if (property != null)\n                {\n                    retVal = property.Values.Where(x => x.Language.Equals(language)).Select(x => x.Value).FirstOrDefault();\n                }\n            }\n\n            return retVal;\n        }\n\n        public static DynamicPropertyDictionaryItem GetDynamicPropertyDictValue(this IEnumerable<DynamicProperty> properties, string propertyName)\n        {\n            var retVal = new DynamicPropertyDictionaryItem();\n\n            if (properties != null)\n            {\n                var property = properties.FirstOrDefault(v => string.Equals(v.Name, propertyName, StringComparison.OrdinalIgnoreCase) && v.IsDictionary && v.Values != null);\n\n                if (property != null)\n                {\n                    retVal = property.DictionaryValues.FirstOrDefault();\n                }\n            }\n\n            return retVal;\n        }\n\n        public static string[] GetDynamicPropertyArrayValues(this IEnumerable<DynamicProperty> properties, string propertyName)\n        {\n            var result = new string[] { };\n\n            if (properties != null)\n            {\n                var property = properties.FirstOrDefault(v => string.Equals(v.Name, propertyName, StringComparison.OrdinalIgnoreCase) && v.IsArray && v.Values != null);\n\n                if (property != null)\n                {\n                    result = property.Values.Select(v => v.Value).ToArray();\n                }\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/EmptyDisposable.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public sealed class EmptyDisposable : IDisposable\n    {\n        public static readonly EmptyDisposable Instance = new EmptyDisposable();\n\n        public void Dispose()\n        {\n            // No-op\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Entity.cs",
    "content": "using System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public abstract class Entity : ValueObject, IEntity\n    {\n        public virtual string Id { get; set; }\n\n        public bool IsTransient()\n        {\n            return Id == null;\n        }\n\n        protected override IEnumerable<object> GetEqualityComponents()\n        {\n            yield return Id;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/EntryState.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Common\n{\n    public enum EntryState\n    {\n        Detached = 1,\n        Unchanged = 2,\n        Added = 4,\n        Deleted = 8,\n        Modified = 16,\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/EnumUtility.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class EnumUtility\n    {\n        public static T SafeParse<T>(string value, T defaultValue)\n            where T : struct\n        {\n            if (!Enum.TryParse(value, out T result))\n            {\n                result = defaultValue;\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/EnumerableExtension.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class EnumerableExtensions\n    {\n        /// <summary>Indicates whether the specified enumerable is null or has a length of zero.</summary>\n        /// <param name=\"data\">The data to test.</param>\n        /// <returns>true if the array parameter is null or has a length of zero; otherwise, false.</returns>\n        public static bool IsNullOrEmpty<T>(this IEnumerable<T> data)\n        {\n            return data == null || !data.Any();\n        }\n\n        public static int GetOrderIndependentHashCode<T>(this IEnumerable<T> source)\n        {\n            var hash = 0;\n            //Need to force order to get  order independent hash code\n            foreach (var element in source.OrderBy(x => x, Comparer<T>.Default))\n            {\n                hash ^= EqualityComparer<T>.Default.GetHashCode(element);\n            }\n            return hash;\n        }\n\n        /// <summary>\n        /// Performs the indicated action on each item.\n        /// </summary>\n        /// <param name=\"action\">The action to be performed.</param>\n        /// <remarks>If an exception occurs, the action will not be performed on the remaining items.</remarks>\n        public static void Apply<T>(this IEnumerable<T> items, Action<T> action)\n        {\n            foreach (var item in items)\n            {\n                action(item);\n            }\n        }\n\n        /// <summary>\n        /// Performs the indicated action on each item. Boxing free for <c>List+Enumerator{T}</c>.\n        /// </summary>\n        /// <param name=\"action\">The action to be performed.</param>\n        /// <remarks>If an exception occurs, the action will not be performed on the remaining items.</remarks>\n        public static void Apply<T>(this List<T> items, Action<T> action)\n        {\n            foreach (var item in items)\n            {\n                action(item);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/EventThrottlingExtensions.cs",
    "content": "using System;\nusing System.IO;\nusing System.Threading.Tasks;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class EventThrottlingExtensions\n    {\n        public static FileSystemEventHandler Throttle(this FileSystemEventHandler handler, TimeSpan throttle)\n        {\n            var throttling = false;\n            return (s, e) =>\n            {\n                if (throttling)\n                {\n                    return;\n                }\n\n                handler(s, e);\n                throttling = true;\n                Task.Delay(throttle).ContinueWith(x => throttling = false);\n            };\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Events/DomainEvent.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Events\n{\n    public class DomainEvent : IEvent\n    {\n        public DomainEvent()\n        {\n            Id = Guid.NewGuid();\n            TimeStamp = DateTime.UtcNow;\n        }\n        public Guid Id { get; set; }\n        public int Version { get; set; }\n        public DateTimeOffset TimeStamp { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Events/ICancellableEventHandler.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common.Messages;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Events\n{\n    public interface ICancellableEventHandler<in T> : ICancellableHandler<T> where T : IEvent\n    {\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Events/IEvent.cs",
    "content": "using System;\nusing VirtoCommerce.Storefront.Model.Common.Messages;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Events\n{\n    public interface IEvent : IMessage\n    {\n        Guid Id { get; set; }\n        int Version { get; set; }\n        DateTimeOffset TimeStamp { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Events/IEventHandler.cs",
    "content": "\nusing VirtoCommerce.Storefront.Model.Common.Messages;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Events\n{\n    public interface IEventHandler<in T> : IHandler<T> where T : IEvent\n    {\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Events/IEventPublisher.cs",
    "content": "using System.Threading;\nusing System.Threading.Tasks;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Events\n{\n    public interface IEventPublisher\n    {\n        Task Publish<T>(T @event, CancellationToken cancellationToken = default(CancellationToken)) where T : class, IEvent;\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Exceptions/StorefrontException.cs",
    "content": "using System;\nusing System.Runtime.Serialization;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Exceptions\n{\n    [Serializable]\n    public class StorefrontException : Exception\n    {\n        public string View { get; set; }\n\n        [Obsolete(DiagnosticId = \"SYSLIB0051\")]\n        protected StorefrontException(SerializationInfo info, StreamingContext context) : base(info, context)\n        {\n            View = info.GetString(\"View\");\n        }\n\n        public StorefrontException()\n        {\n\n        }\n\n        public StorefrontException(string message)\n           : this(message, null)\n        {\n        }\n        public StorefrontException(string message, string view)\n            : this(message, null, view)\n        {\n        }\n\n        public StorefrontException(string message, Exception innerException, string view)\n            : base(message, innerException)\n        {\n            View = view;\n        }\n\n        [Obsolete(DiagnosticId = \"SYSLIB0051\")]\n        public override void GetObjectData(SerializationInfo info, StreamingContext context)\n        {\n            base.GetObjectData(info, context);\n\n            info.AddValue(\"View\", View);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/GenericSearchResult.cs",
    "content": "using System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public class GenericSearchResult<T>\n    {\n        public GenericSearchResult()\n        {\n            Results = new List<T>();\n        }\n\n        public int TotalCount { get; set; }\n        public ICollection<T> Results { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/GeoPoint.cs",
    "content": "using System;\nusing System.Globalization;\nusing System.Text.RegularExpressions;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public class GeoPoint : ValueObject\n    {\n        public static readonly Regex Regexp = new Regex(@\"^([-+]?(?:[1-8]?\\d(?:\\.\\d+)?|90(?:\\.0+)?)),\\s*([-+]?(?:180(?:\\.0+)?|(?:(?:1[0-7]\\d)|(?:[1-9]?\\d))(?:\\.\\d+)?))$\", RegexOptions.Compiled);\n        public GeoPoint()\n            : this(0, 0)\n        {\n        }\n\n        public GeoPoint(double latitude, double longitude)\n        {\n            if (!IsValidLatitude(latitude))\n            {\n                throw new ArgumentOutOfRangeException(string.Format(CultureInfo.InvariantCulture, \"Invalid latitude '{0}'. Valid values are between -90 and 90\", latitude));\n            }\n            if (!IsValidLongitude(longitude))\n            {\n                throw new ArgumentOutOfRangeException(string.Format(CultureInfo.InvariantCulture, \"Invalid longitude '{0}'. Valid values are between -180 and 180\", longitude));\n            }\n            Latitude = latitude;\n            Longitude = longitude;\n        }\n\n        public double Latitude { get; set; }\n        public double Longitude { get; set; }\n\n        /// <summary>\n\t\t/// True if <paramref name=\"latitude\"/> is a valid latitude. Otherwise false.\n\t\t/// </summary>\n\t\t/// <param name=\"latitude\"></param>\n\t\t/// <returns></returns>\n\t\tpublic static bool IsValidLatitude(double latitude)\n        {\n            return latitude >= -90 && latitude <= 90;\n        }\n\n        /// <summary>\n        /// True if <paramref name=\"longitude\"/> is a valid longitude. Otherwise false.\n        /// </summary>\n        /// <param name=\"longitude\"></param>\n        /// <returns></returns>\n        public static bool IsValidLongitude(double longitude)\n        {\n            return longitude >= -180 && longitude <= 180;\n        }\n\n        public override string ToString()\n        {\n            return Latitude.ToString(\"#0.0#######\", CultureInfo.InvariantCulture) + \",\" + Longitude.ToString(\"#0.0#######\", CultureInfo.InvariantCulture);\n        }\n\n        public static GeoPoint Parse(string value)\n        {\n            var result = TryParse(value);\n            if (result == null)\n            {\n                throw new ArgumentException(\"\", nameof(value));\n            }\n            return result;\n        }\n\n        public static GeoPoint TryParse(string value)\n        {\n            GeoPoint result = null;\n            var match = Regexp.Match(value);\n\n            if (match.Success && match.Groups.Count == 3)\n            {\n                result = new GeoPoint\n                {\n                    Latitude = Math.Round(double.Parse(match.Groups[1].Value, NumberStyles.Float, CultureInfo.InvariantCulture), 7),\n                    Longitude = Math.Round(double.Parse(match.Groups[2].Value, NumberStyles.Float, CultureInfo.InvariantCulture), 7)\n                };\n            }\n            return result;\n\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/IAccessibleByIndexKey.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Common\n{\n    /// <summary>\n    /// Represents helper abstraction that used for index access to entity by it key.\n    /// </summary>\n    public interface IAccessibleByIndexKey\n    {\n        string IndexKey { get; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/IEntity.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Common\n{\n    public interface IEntity\n    {\n        string Id { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/IHasBreadcrumbs.cs",
    "content": "using System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public interface IHasBreadcrumbs\n    {\n        IEnumerable<Breadcrumb> GetBreadcrumbs();\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/IHasQueryKeyValues.cs",
    "content": "using System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public interface IHasQueryKeyValues\n    {\n        IEnumerable<KeyValuePair<string, string>> GetQueryKeyValues();\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/IMutablePagedList.cs",
    "content": "using System.Collections.Generic;\nusing System.Collections.Specialized;\nusing PagedList.Core;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    /// <summary>\n    /// PagedList which page number and page size can be changed  (on render view time for example)\n    /// </summary>\n    public interface IMutablePagedList : IPagedList\n    {\n        /// <summary>\n        /// Contains information for sorting order\n        /// </summary>\n        IEnumerable<SortInfo> SortInfos { get; }\n        /// <summary>\n        /// Slice  the current set of data by new page sizes\n        /// </summary>\n        /// <param name=\"pageNumber\"></param>\n        /// <param name=\"pageSize\"></param>\n        void Slice(int pageNumber, int pageSize, IEnumerable<SortInfo> sortInfos, NameValueCollection @params = null);\n    }\n\n    public interface IMutablePagedList<out T> : IMutablePagedList, IPagedList<T>\n    {\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/IQueryableExtensions.cs",
    "content": "using System;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Reflection;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class IQueryableExtensions\n    {\n        public static IOrderedQueryable<T> OrderBy<T>(this IQueryable<T> source, string property)\n        {\n            return ApplyOrder<T>(source, property, \"OrderBy\");\n        }\n        public static IOrderedQueryable<T> OrderByDescending<T>(this IQueryable<T> source, string property)\n        {\n            return ApplyOrder<T>(source, property, \"OrderByDescending\");\n        }\n        public static IOrderedQueryable<T> ThenBy<T>(this IOrderedQueryable<T> source, string property)\n        {\n            return ApplyOrder<T>(source, property, \"ThenBy\");\n        }\n        public static IOrderedQueryable<T> ThenByDescending<T>(this IOrderedQueryable<T> source, string property)\n        {\n            return ApplyOrder<T>(source, property, \"ThenByDescending\");\n        }\n\n\n        public static IOrderedQueryable<T> OrderBySortInfos<T>(this IQueryable<T> source, SortInfo[] sortInfos)\n        {\n            if (sortInfos.IsNullOrEmpty())\n            {\n                throw new ArgumentNullException(\"sortInfos\");\n            }\n\n            var firstSortInfo = sortInfos.First();\n\n            var retVal = firstSortInfo.SortDirection == SortDirection.Descending ? source.OrderByDescending(firstSortInfo.SortColumn) : source.OrderBy(firstSortInfo.SortColumn);\n\n            return retVal.ThenBySortInfos(sortInfos.Skip(1).ToArray());\n        }\n\n        public static IOrderedQueryable<T> ThenBySortInfos<T>(this IOrderedQueryable<T> source, SortInfo[] sortInfos)\n        {\n            var retVal = source;\n            if (sortInfos.IsNullOrEmpty())\n            {\n                foreach (var sortInfo in sortInfos)\n                {\n                    if (sortInfo.SortDirection == SortDirection.Descending)\n                    {\n                        retVal = retVal.ThenByDescending(sortInfo.SortColumn);\n                    }\n                    else\n                    {\n                        retVal = retVal.ThenBy(sortInfo.SortColumn);\n                    }\n                }\n            }\n            return retVal;\n        }\n\n        public static IOrderedQueryable<T> ApplyOrder<T>(IQueryable<T> source, string property, string methodName)\n        {\n            if (property == null)\n            {\n                throw new ArgumentNullException(\"property\");\n            }\n\n            var props = property.Split('.');\n            var type = source.ElementType;\n            var arg = Expression.Parameter(type, \"x\");\n            Expression expr = arg;\n            foreach (var prop in props)\n            {\n                // use reflection (not ComponentModel) to mirror LINQ\n                var pi = type.GetProperty(prop, BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance);\n                if (pi != null)\n                {\n                    expr = Expression.Property(expr, pi);\n                    type = pi.PropertyType;\n                }\n                else\n                {\n                    return source.OrderBy(x => 1);\n                }\n            }\n\n            var delegateType = typeof(Func<,>).MakeGenericType(typeof(T), type);\n            var lambda = Expression.Lambda(delegateType, expr, arg);\n\n            var result = typeof(Queryable).GetMethods().Single(\n                    method => method.Name == methodName\n                            && method.IsGenericMethodDefinition\n                            && method.GetGenericArguments().Length == 2\n                            && method.GetParameters().Length == 2)\n                    .MakeGenericMethod(typeof(T), type)\n                    .Invoke(null, new object[] { source, lambda });\n            return (IOrderedQueryable<T>)result;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/IStorefrontUrlBuilder.cs",
    "content": "using VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public interface IStorefrontUrlBuilder\n    {\n        string ToAppAbsolute(string virtualPath);\n        string ToAppAbsolute(string virtualPath, Store store, Language language);\n        string ToStoreAbsolute(string virtualPath, Store store = null, Language language = null);\n        string ToAppRelative(string virtualPath);\n        string ToAppRelative(string virtualPath, Store store, Language language);\n        string ToLocalPath(string virtualPath);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/IValueObject.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Common\n{\n    public interface IValueObject\n    {\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/LocalizationExtensions.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class LocalizationExtensions\n    {\n        private static readonly RegionInfo[] _cachedRegionInfos = CultureInfo.GetCultures(CultureTypes.AllCultures)\n            .Where(c => !c.IsNeutralCulture && c.LCID != 127)\n            .Select(x =>\n            {\n                try\n                {\n                    return new RegionInfo(x.LCID);\n                }\n                catch\n                {\n                    return null;\n                }\n            }).Where(x => x != null).ToArray();\n\n        public static T FindWithLanguage<T>(this IEnumerable<T> items, Language language)\n         where T : IHasLanguage\n        {\n            var retVal = items.FirstOrDefault(i => i.Language.Equals(language));\n\n            if (retVal == null)\n            {\n                retVal = items.FirstOrDefault(x => x.Language.IsInvariant);\n            }\n            return retVal;\n        }\n\n        public static TValue FindWithLanguage<T, TValue>(this IEnumerable<T> items, Language language, Func<T, TValue> valueGetter, TValue defaultValue) where T : IHasLanguage\n        {\n            var retVal = defaultValue;\n            var item = items.OfType<IHasLanguage>().FindWithLanguage(language);\n            if (item != null)\n            {\n                retVal = valueGetter((T)item);\n            }\n            return retVal;\n        }\n\n        /// <summary>\n        /// Return all localized strings for specified language also always returns strings with invariant language\n        /// </summary>\n        /// <param name=\"localizedStrings\"></param>\n        /// <param name=\"language\"></param>\n        /// <returns></returns>\n        public static IEnumerable<LocalizedString> GetLocalizedStringsForLanguage(this IEnumerable<LocalizedString> localizedStrings, Language language)\n        {\n            if (localizedStrings == null)\n            {\n                throw new ArgumentNullException(\"localizedStrings\");\n            }\n            if (language == null)\n            {\n                throw new ArgumentNullException(\"language\");\n            }\n            var retVal = localizedStrings.Where(x => x.Language == language || x.Language.IsInvariant).ToArray();\n            return retVal;\n        }\n\n        public static string GetCurrencySymbol(this string ISOCurrencySymbol)\n        {\n            var symbol = _cachedRegionInfos.Where(x => x != null && String.Equals(x.ISOCurrencySymbol, ISOCurrencySymbol, StringComparison.InvariantCultureIgnoreCase))\n                                       .Select(ri => ri.CurrencySymbol)\n                                       .FirstOrDefault();\n            return symbol;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Messages/ICancellableHandler.cs",
    "content": "using System.Threading;\nusing System.Threading.Tasks;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Messages\n{\n    public interface ICancellableHandler<in T> where T : IMessage\n    {\n        Task Handle(T message, CancellationToken token = default(CancellationToken));\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Messages/IHandler.cs",
    "content": "using System.Threading.Tasks;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Messages\n{\n    public interface IHandler<in T> where T : IMessage\n    {\n        Task Handle(T message);\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Messages/IMessage.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Common.Messages\n{\n    public interface IMessage\n    { }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Money/Currency.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing Newtonsoft.Json;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    /// <summary>\n    /// Represent currency information in storefront. Contains some extra informations as exchnage rate, symbol, formating. \n    /// </summary>\n    public class Currency : ValueObject\n    {\n        private static readonly IDictionary<string, string> _isoCurrencySymbolDict = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase).WithDefaultValue(null);\n        static Currency()\n        {\n            foreach (var ci in CultureInfo.GetCultures(CultureTypes.SpecificCultures))\n            {\n                try\n                {\n                    var ri = new RegionInfo(ci.LCID);\n                    _isoCurrencySymbolDict[ri.ISOCurrencySymbol] = ri.CurrencySymbol;\n                }\n                catch (Exception)\n                {\n                    // No actions needed\n                }\n            }\n        }\n\n        private Language _language;\n        private string _code;\n\n        protected Currency()\n        {\n        }\n\n        public Currency(Language language, string code, string name, string symbol, decimal exchangeRate)\n            : this(language, code)\n        {\n            ExchangeRate = exchangeRate;\n\n            if (!string.IsNullOrEmpty(name))\n            {\n                EnglishName = name;\n            }\n            if (!string.IsNullOrEmpty(symbol))\n            {\n                Symbol = symbol;\n                NumberFormat.CurrencySymbol = symbol;\n            }\n        }\n\n        public Currency(Language language, string code)\n        {\n            _language = language;\n            _code = code;\n            ExchangeRate = 1;\n            Initialize();\n        }\n\n        /// <summary>\n        /// Currency code may be used ISO 4217\n        /// </summary>\n        public string Code\n        {\n            get { return _code; }\n            set\n            {\n                _code = value;\n                Initialize();\n            }\n        }\n\n        public string CultureName\n        {\n            get\n            {\n                return _language?.CultureName;\n            }\n            set\n            {\n                _language = new Language(value);\n                Initialize();\n            }\n        }\n\n        [JsonIgnore]\n        public NumberFormatInfo NumberFormat { get; private set; }\n        public string Symbol { get; set; }\n        public string EnglishName { get; set; }\n        /// <summary>\n        /// Exchnage rate with primary currency\n        /// </summary>\n        public decimal ExchangeRate { get; set; }\n        /// <summary>\n        /// https://msdn.microsoft.com/en-us/library/dwhawy9k%28v=vs.110%29.aspx?f=255&amp;MSPPError=-2147217396\n        /// </summary>\n        public string CustomFormatting { get; set; }\n\n\n        private void Initialize()\n        {\n            if (_language != null)\n            {\n                if (!_language.IsInvariant)\n                {\n                    var cultureInfo = CultureInfo.GetCultureInfo(_language.CultureName);\n                    NumberFormat = (NumberFormatInfo)cultureInfo.NumberFormat.Clone();\n                    EnglishName = cultureInfo.NumberFormat.CurrencySymbol;\n\n                    if (!cultureInfo.IsNeutralCulture)\n                    {\n                        var region = new RegionInfo(_language.CultureName);\n                        EnglishName = region.CurrencyEnglishName;\n                    }\n                    if (_code != null)\n                    {\n                        Symbol = _isoCurrencySymbolDict[_code] ?? \"N/A\";\n                        NumberFormat.CurrencySymbol = Symbol;\n                    }\n                }\n                else\n                {\n                    NumberFormat = CultureInfo.InvariantCulture.NumberFormat.Clone() as NumberFormatInfo;\n                }\n            }\n        }\n\n\n\n        public override int GetHashCode()\n        {\n            return base.GetHashCode();\n        }\n\n        public override bool Equals(object obj)\n        {\n            var result = base.Equals(obj);\n            if (!result && obj is string code)\n            {\n                result = code.EqualsInvariant(Code);\n            }\n            return result;\n        }\n\n        protected override IEnumerable<object> GetEqualityComponents()\n        {\n            yield return Code;\n            yield return CultureName;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Money/IConvertible.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Common\n{\n    public interface IConvertible<out T>\n    {\n        T ConvertTo(Currency currency);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Money/Money.cs",
    "content": "/*\n * This Money class gives you the ability to work with money of multiple currencies\n * as if it were numbers.\n * It looks and behaves like a decimal.\n * Super light: Only a 64bit double and 16bit int are used to persist an instance.\n * Super fast: Access to the internal double value for fast calculations.\n * Currency codes are used to get everything from the MS Globalization classes.\n * All lookups happen from a singleton dictionary.\n * Formatting and significant digits are automatically handled.\n * An allocation function also allows even distribution of Money.\n * \n * References:\n * Martin Fowler patterns\n * Making Money with C# : http://www.lindelauf.com/?p=17\n * http://www.codeproject.com/Articles/28244/A-Money-type-for-the-CLR?msg=3679755\n * A few other articles on the web around representing money types\n * http://en.wikipedia.org/wiki/ISO_4217\n * http://www.currency-iso.org/iso_index/iso_tables/iso_tables_a1.htm\n * \n * NB!\n * Although the .Amount property wraps the class as Decimal, this Money class uses double to store the Money value internally.\n * Only 15 decimal digits of accuracy are guaranteed! (16 if the first digit is smaller than 9)\n * It should be fairly simple to replace the internal double with a decimal if this is not sufficient and performance is not an issue.\n * Decimal operations are MUCH slower than double (average of 15x)\n * http://stackoverflow.com/questions/366852/c-sharp-decimal-datatype-performance\n * Use the .InternalAmount property to get to the double member.\n * All the Money comparison operators use the Decimal wrapper with significant digits for the currency.\n * All the Money arithmetic (+-/*) operators use the internal double value.\n */\n\nusing System;\nusing System.Globalization;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public sealed class Money : IComparable<Money>, IEquatable<Money>, IComparable, IConvertible<Money>, ICloneable\n    {\n        #region Constructors\n\n        public Money()\n        {\n        }\n\n        public Money(Currency currency)\n            : this(0m, currency)\n        {\n        }\n\n        public Money(double amount, Currency currency)\n            : this((decimal)amount, currency)\n        {\n        }\n\n        public Money(decimal amount, Currency currency)\n        {\n            Currency = currency ?? throw new ArgumentNullException(nameof(currency));\n            InternalAmount = amount;\n        }\n\n        #endregion\n\n        #region Public Properties\n        /// <summary>\n        /// Accesses the internal representation of the value of the Money\n        /// </summary>\n        /// <returns>A decimal with the internal amount stored for this Money.</returns>\n        public decimal InternalAmount { get; }\n\n        /// <summary>\n        /// Rounds the amount to the number of significant decimal digits\n        /// of the associated currency using MidpointRounding.AwayFromZero.\n        /// </summary>\n        /// <returns>A decimal with the amount rounded to the significant number of decimal digits.</returns>\n        public decimal Amount\n        {\n            get\n            {\n                return decimal.Round(InternalAmount, DecimalDigits, MidpointRounding.AwayFromZero);\n            }\n        }\n\n        /// <summary>\n        /// Truncates the amount to the number of significant decimal digits\n        /// of the associated currency.\n        /// </summary>\n        /// <returns>A decimal with the amount truncated to the significant number of decimal digits.</returns>\n        public decimal TruncatedAmount\n        {\n            get\n            {\n                var roundingBase = (decimal)Math.Pow(10, DecimalDigits);\n                return (long)Math.Truncate(InternalAmount * roundingBase) / roundingBase;\n            }\n        }\n\n        public string FormattedAmount\n        {\n            get { return ToString(true, true); }\n        }\n\n        public string FormattedAmountWithoutPoint\n        {\n            get { return ToString(false, true); }\n        }\n        public string FormattedAmountWithoutCurrency\n        {\n            get { return ToString(false, true); }\n        }\n        public string FormattedAmountWithoutPointAndCurrency\n        {\n            get { return ToString(false, false); }\n        }\n\n        public Currency Currency { get; }\n\n\n        /// <summary>\n        /// Gets the number of decimal digits for the associated currency.\n        /// </summary>\n        /// <returns>An int containing the number of decimal digits.</returns>\n        public int DecimalDigits\n        {\n            get { return Currency.NumberFormat.CurrencyDecimalDigits; }\n        }\n        #endregion\n\n        #region Money Operators\n\n        public override int GetHashCode()\n        {\n            return Amount.GetHashCode() ^ Currency.Code.GetHashCode();\n        }\n\n        public override bool Equals(object obj)\n        {\n            return (obj is Money money) && Equals(money);\n        }\n\n        public bool Equals(Money other)\n        {\n            if (other == null)\n            {\n                return false;\n            }\n\n            if (ReferenceEquals(this, other))\n            {\n                return true;\n            }\n\n            return ((Currency.Equals(other.Currency)) && (InternalAmount == other.InternalAmount));\n        }\n\n        public static bool operator ==(Money first, Money second)\n        {\n            if (ReferenceEquals(first, second))\n            {\n                return true;\n            }\n\n            if (first is null || second is null)\n            {\n                return false;\n            }\n\n            return first.Equals(second);\n        }\n\n        public static bool operator !=(Money first, Money second)\n        {\n            return !(first == second);\n        }\n\n        public static bool operator >(Money first, Money second)\n        {\n            return first.InternalAmount > second.ConvertTo(first.Currency).InternalAmount\n              && second.InternalAmount < first.ConvertTo(second.Currency).InternalAmount;\n        }\n\n        public static bool operator >=(Money first, Money second)\n        {\n            return first.InternalAmount >= second.ConvertTo(first.Currency).InternalAmount\n              && second.InternalAmount <= first.ConvertTo(second.Currency).InternalAmount;\n        }\n\n        public static bool operator <=(Money first, Money second)\n        {\n            return first.InternalAmount <= second.ConvertTo(first.Currency).InternalAmount\n              && second.InternalAmount >= first.ConvertTo(second.Currency).InternalAmount;\n        }\n\n        public static bool operator <(Money first, Money second)\n        {\n            return first.InternalAmount < second.ConvertTo(first.Currency).InternalAmount\n              && second.InternalAmount > first.ConvertTo(second.Currency).InternalAmount;\n        }\n\n        public int CompareTo(object obj)\n        {\n            if (obj == null)\n            {\n                return 1;\n            }\n\n            if (!(obj is Money))\n            {\n                throw new ArgumentException(\"Argument must be Money\");\n            }\n\n            return CompareTo((Money)obj);\n        }\n\n        public int CompareTo(Money other)\n        {\n            if (this < other)\n            {\n                return -1;\n            }\n\n            return this > other ? 1 : 0;\n        }\n\n        public static Money operator +(Money first, Money second)\n        {\n            return new Money(first.InternalAmount + second.ConvertTo(first.Currency).InternalAmount, first.Currency);\n        }\n\n        public static Money operator -(Money first, Money second)\n        {\n            return new Money(first.InternalAmount - second.ConvertTo(first.Currency).InternalAmount, first.Currency);\n        }\n\n        public static Money operator *(Money first, Money second)\n        {\n            return new Money(first.InternalAmount * second.ConvertTo(first.Currency).InternalAmount, first.Currency);\n        }\n\n        public static Money operator /(Money first, Money second)\n        {\n            return new Money(first.InternalAmount / second.ConvertTo(first.Currency).InternalAmount, first.Currency);\n        }\n\n        #endregion\n\n        #region Cast Operators\n\n        public static bool operator ==(Money money, long value)\n        {\n            return money is object && money.InternalAmount == value;\n        }\n        public static bool operator !=(Money money, long value)\n        {\n            return !(money == value);\n        }\n\n        public static bool operator ==(Money money, decimal value)\n        {\n            return !ReferenceEquals(money, null) && money.InternalAmount == value;\n        }\n        public static bool operator !=(Money money, decimal value)\n        {\n            return !(money == value);\n        }\n\n        public static bool operator ==(Money money, double value)\n        {\n            return !ReferenceEquals(money, null) && money.InternalAmount == (decimal)value;\n        }\n        public static bool operator !=(Money money, double value)\n        {\n            return !(money == value);\n        }\n\n        public static Money operator +(Money money, long value)\n        {\n            return money + (decimal)value;\n        }\n        public static Money operator +(Money money, double value)\n        {\n            return money + (decimal)value;\n        }\n        public static Money operator +(Money money, decimal value)\n        {\n            if (money == null)\n            {\n                throw new ArgumentNullException(nameof(money));\n            }\n\n            return new Money(money.InternalAmount + value, money.Currency);\n        }\n\n        public static Money operator -(Money money, long value)\n        {\n            return money - (decimal)value;\n        }\n        public static Money operator -(Money money, double value)\n        {\n            return money - (decimal)value;\n        }\n        public static Money operator -(Money money, decimal value)\n        {\n            if (money == null)\n            {\n                throw new ArgumentNullException(nameof(money));\n            }\n\n            return new Money(money.InternalAmount - value, money.Currency);\n        }\n\n        public static Money operator *(Money money, long value)\n        {\n            return money * (decimal)value;\n        }\n        public static Money operator *(Money money, double value)\n        {\n            return money * (decimal)value;\n        }\n        public static Money operator *(Money money, decimal value)\n        {\n            if (money == null)\n            {\n                throw new ArgumentNullException(nameof(money));\n            }\n\n            return new Money(money.InternalAmount * value, money.Currency);\n        }\n\n        public static Money operator /(Money money, long value)\n        {\n            return money / (decimal)value;\n        }\n        public static Money operator /(Money money, double value)\n        {\n            return money / (decimal)value;\n        }\n\n        public static Money operator /(Money money, decimal value)\n        {\n            if (money == null)\n            {\n                throw new ArgumentNullException(nameof(money));\n            }\n\n            return new Money(money.InternalAmount / value, money.Currency);\n        }\n\n        #endregion\n\n        #region Functions\n\n        public override string ToString()\n        {\n            return ToString(true, true);\n        }\n\n        public string ToString(bool showDecimalDigits, bool showCurrencySymbol)\n        {\n            string result = null;\n\n            if (Currency != null && !string.IsNullOrEmpty(Currency.CustomFormatting))\n            {\n                result = Amount.ToString(Currency.CustomFormatting, Currency.NumberFormat);\n            }\n\n            if (result == null)\n            {\n                var format = showDecimalDigits ? \"C\" : \"C0\";\n\n                var numberFormat = Currency != null && Currency.NumberFormat != null\n                    ? Currency.NumberFormat\n                    : CultureInfo.InvariantCulture.NumberFormat;\n\n                if (!showCurrencySymbol)\n                {\n                    numberFormat = (NumberFormatInfo)numberFormat.Clone();\n                    numberFormat.CurrencySymbol = string.Empty;\n                }\n\n                result = Amount.ToString(format, numberFormat);\n            }\n\n            return result;\n        }\n\n        #endregion\n\n        #region IConvertible<Money> Members\n\n        public Money ConvertTo(Currency currency)\n        {\n            if (Currency == currency)\n            {\n                return this;\n            }\n\n            return new Money(InternalAmount * Currency.ExchangeRate / currency.ExchangeRate, currency);\n        }\n        #endregion\n\n        #region ICloneable members\n        public object Clone()\n        {\n            var result = MemberwiseClone() as Money;\n            return result;\n        }\n        #endregion\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/MutablePagedList.cs",
    "content": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Collections.Specialized;\nusing System.Linq;\nusing PagedList.Core;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public sealed class MutablePagedList<T> : PagedListMetaData, IMutablePagedList<T>, IList, IDictionary\n    {\n        private static readonly MutablePagedList<T> _empty = new MutablePagedList<T>(Enumerable.Empty<T>());\n        private readonly Func<int, int, IEnumerable<SortInfo>, NameValueCollection, IPagedList<T>> _getter;\n        private IPagedList<T> _pagedList;\n        private readonly object _lockObject = new object();\n\n        public MutablePagedList(IEnumerable<T> superSet, int pageNumber, int pageSize, int totalCount)\n          : this((newPageNumber, newPageSize, sortInfos) => new StaticPagedList<T>(superSet.AsQueryable(), newPageNumber, newPageSize, totalCount), pageNumber, pageSize)\n        {\n            TotalItemCount = totalCount;\n            PageCount = 1;\n        }\n\n        public MutablePagedList(IEnumerable<T> superSet)\n            : this(superSet, 1, 1, superSet.Count())\n        {\n        }\n\n        public MutablePagedList(Func<int, int, IEnumerable<SortInfo>, IPagedList<T>> getter, int pageNumber, int pageSize)\n            : this((pn, ps, sortInfos, parameters) => getter(pageNumber, pageSize, sortInfos), pageNumber, pageSize)\n        {\n        }\n\n        public MutablePagedList(Func<int, int, IEnumerable<SortInfo>, NameValueCollection, IPagedList<T>> getter, int pageNumber, int pageSize)\n        {\n            PageNumber = pageNumber;\n            PageSize = pageSize;\n            _getter = getter;\n        }\n\n        public static MutablePagedList<T> Empty\n        {\n            get\n            {\n                return _empty;\n            }\n        }\n\n        #region IMutablePagedList Members\n\n        public IEnumerable<SortInfo> SortInfos { get; private set; }\n        public NameValueCollection Params { get; private set; }\n        /// <summary>\n        /// Resize current paged data list by new PageNumber and PageSize values (it may cause reloading data from source)\n        /// </summary>\n        /// <param name=\"pageNumber\"></param>\n        /// <param name=\"pageSize\"></param>\n        public void Slice(int pageNumber, int pageSize, IEnumerable<SortInfo> sortInfos, NameValueCollection @params = null)\n        {\n            if (pageNumber < 1)\n            {\n                throw new ArgumentOutOfRangeException(\"pageNumber\", pageNumber, \"PageNumber cannot be below 1.\");\n            }\n\n            if (pageSize < 1)\n            {\n                throw new ArgumentOutOfRangeException(\"pageSize\", pageSize, \"PageSize cannot be less than 1.\");\n            }\n\n            if (pageNumber != PageNumber)\n            {\n                PageNumber = pageNumber;\n                _pagedList = null;\n            }\n            if (pageSize != PageSize)\n            {\n                PageSize = pageSize;\n                _pagedList = null;\n            }\n\n            if (SortInfos != sortInfos)\n            {\n                SortInfos = sortInfos;\n                _pagedList = null;\n            }\n\n            if (Params != @params)\n            {\n                Params = @params;\n                _pagedList = null;\n            }\n\n            ReloadPagedData();\n        }\n\n        #endregion\n\n        #region IPagedList<T> Members\n\n        /// <summary>\n        /// \tReturns an enumerator that iterates through the BasePagedList&lt;T&gt;.\n        /// </summary>\n        /// <returns>A BasePagedList&lt;T&gt;.Enumerator for the BasePagedList&lt;T&gt;.</returns>\n        public IEnumerator<T> GetEnumerator()\n        {\n            ReloadPagedData();\n            return _pagedList.GetEnumerator();\n        }\n\n        /// <summary>\n        /// \tReturns an enumerator that iterates through the BasePagedList&lt;T&gt;.\n        /// </summary>\n        /// <returns>A BasePagedList&lt;T&gt;.Enumerator for the BasePagedList&lt;T&gt;.</returns>\n        IEnumerator IEnumerable.GetEnumerator()\n        {\n            return GetEnumerator();\n        }\n\n        ///<summary>\n        ///\tGets the element at the specified index.\n        ///</summary>\n        ///<param name = \"index\">The zero-based index of the element to get.</param>\n        public T this[int index]\n        {\n            get\n            {\n                ReloadPagedData();\n                return _pagedList[index];\n            }\n        }\n\n        /// <summary>\n        /// \tGets the number of elements contained on this page.\n        /// </summary>\n        public int Count\n        {\n            get\n            {\n                ReloadPagedData();\n                return _pagedList.Count;\n            }\n        }\n\n        ///<summary>\n        /// Gets a non-enumerable copy of this paged list.\n        ///</summary>\n        ///<returns>A non-enumerable copy of this paged list.</returns>\n        public IPagedList GetMetaData()\n        {\n            ReloadPagedData();\n            return new PagedListMetaData(this);\n        }\n\n        #endregion\n\n        #region IList\n        object IList.this[int index]\n        {\n            get\n            {\n                ReloadPagedData();\n                return _pagedList.OfType<object>().ToList()[index];\n\n            }\n            set => throw new NotImplementedException();\n        }\n\n        public bool IsFixedSize => false;\n\n        public bool IsReadOnly => true;\n\n\n        public bool IsSynchronized => false;\n\n        public object SyncRoot => _pagedList;\n\n\n\n        public int Add(object value)\n        {\n            throw new NotImplementedException();\n        }\n\n        public bool CanWrite(string member)\n        {\n            throw new NotImplementedException();\n        }\n\n        public void Clear()\n        {\n            throw new NotImplementedException();\n        }\n\n\n        public bool Contains(object value)\n        {\n            return TryGetValue(value, out _);\n        }\n\n\n        public void CopyTo(Array array, int index)\n        {\n            throw new NotImplementedException();\n        }\n\n\n        public int IndexOf(object value)\n        {\n            var result = -1;\n            if (TryGetValue(value, out var obj))\n            {\n                result = _pagedList.OfType<object>().ToList().IndexOf(obj);\n            }\n            return result;\n        }\n\n        public void Insert(int index, object value)\n        {\n            throw new NotImplementedException();\n        }\n\n        public void Remove(object value)\n        {\n            throw new NotImplementedException();\n        }\n\n        public void RemoveAt(int index)\n        {\n            throw new NotImplementedException();\n        }\n\n        public void Add(object key, object value)\n        {\n            throw new NotImplementedException();\n        }\n\n\n        #endregion\n        #region IDictionary\n\n        public ICollection Keys\n        {\n            get\n            {\n                ReloadPagedData();\n                var dictionary = _pagedList.OfType<IAccessibleByIndexKey>().ToDictionary(x => x.IndexKey, x => x);\n                return dictionary.Keys;\n\n            }\n        }\n        public ICollection Values\n        {\n            get\n            {\n                ReloadPagedData();\n                var dictionary = _pagedList.OfType<IAccessibleByIndexKey>().ToDictionary(x => x.IndexKey, x => x);\n                return dictionary.Values;\n            }\n        }\n\n\n\n        public object this[object key]\n        {\n            get\n            {\n                TryGetValue(key, out var result);\n                return result;\n            }\n            set\n            {\n                throw new NotImplementedException();\n            }\n        }\n\n\n        IDictionaryEnumerator IDictionary.GetEnumerator()\n        {\n            ReloadPagedData();\n            var dictionary = _pagedList.OfType<IAccessibleByIndexKey>().ToDictionary(x => x.IndexKey, x => x);\n            return dictionary.GetEnumerator();\n        }\n        #endregion\n\n        private bool TryGetValue(object key, out object value)\n        {\n            if (key == null)\n            {\n                throw new ArgumentNullException(nameof(key));\n            }\n\n            value = null;\n            ReloadPagedData();\n            if (key is string stringKey)\n            {\n                if (stringKey == \"size\")\n                {\n                    value = Count;\n                }\n                else\n                {\n                    value = _pagedList.OfType<IAccessibleByIndexKey>().Where(x => !string.IsNullOrEmpty(x.IndexKey)).FirstOrDefault(x => x.IndexKey.EqualsInvariant(stringKey));\n                }\n            }\n            else if (key is IAccessibleByIndexKey accessibleByIndexKey)\n            {\n                value = _pagedList.OfType<IAccessibleByIndexKey>().FirstOrDefault(x => x.IndexKey.EqualsInvariant(accessibleByIndexKey.IndexKey));\n            }\n            else\n            {\n                value = _pagedList.FirstOrDefault(x => x.Equals(key));\n            }\n            return value != null;\n        }\n\n        private void ReloadPagedData()\n        {\n            if (_pagedList == null)\n            {\n                lock (_lockObject)\n                {\n                    if (_pagedList == null)\n                    {\n                        _pagedList = _getter(PageNumber, PageSize, SortInfos, Params);\n                    }\n                }\n                // set source to blank list if superset is null to prevent exceptions\n                TotalItemCount = _pagedList.TotalItemCount;\n                PageCount = TotalItemCount > 0\n                                ? (int)Math.Ceiling(TotalItemCount / (double)PageSize)\n                                : 0;\n                HasPreviousPage = PageNumber > 1;\n                HasNextPage = PageNumber < PageCount;\n                IsFirstPage = PageNumber == 1;\n                IsLastPage = PageNumber >= PageCount;\n                FirstItemOnPage = (PageNumber - 1) * PageSize + 1;\n                var numberOfLastItemOnPage = FirstItemOnPage + PageSize - 1;\n                LastItemOnPage = numberOfLastItemOnPage > TotalItemCount\n                                     ? TotalItemCount\n                                     : numberOfLastItemOnPage;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/MutablePagedListExtensions.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class MutablePagedListExtensions\n    {\n        /// <summary>\n        /// Loads current page and returns total items count.\n        /// </summary>\n        /// <typeparam name=\"T\"></typeparam>\n        /// <param name=\"list\"></param>\n        /// <returns></returns>\n        public static int GetTotalCount<T>(this IMutablePagedList<T> list)\n        {\n            var result = 0;\n\n            if (list == null)\n            {\n                return result;\n            }\n\n            using var enumerator = list.GetEnumerator();\n\n            result = list.TotalItemCount;\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Notifications/EmailNotificationBase.cs",
    "content": "using System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Notifications\n{\n    public abstract class EmailNotificationBase : NotificationBase\n    {\n        protected EmailNotificationBase(string storeId, Language language)\n            : base(storeId, language)\n        {\n        }\n\n        public string Sender { get; set; }\n\n        public override IEnumerable<KeyValuePair<string, string>> GetNotificationParameters()\n        {\n            foreach (var kvp in base.GetNotificationParameters())\n            {\n                yield return kvp;\n            }\n\n            yield return new KeyValuePair<string, string>(nameof(Sender), Sender);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Notifications/NotificationBase.cs",
    "content": "using System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.Common.Notifications\n{\n    public abstract class NotificationBase : ValueObject\n    {\n        protected NotificationBase(string storeId, Language language)\n        {\n            Type = GetType().Name;\n            StoreId = storeId;\n            Language = language;\n        }\n\n        public string Type { get; private set; }\n        public string StoreId { get; set; }\n        public Language Language { get; set; }\n        public string Recipient { get; set; }\n\n        public virtual IEnumerable<KeyValuePair<string, string>> GetNotificationParameters()\n        {\n            yield return new KeyValuePair<string, string>(nameof(Recipient), Recipient);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Notifications/SmsNotificationBase.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Common.Notifications\n{\n    public abstract class SmsNotificationBase : NotificationBase\n    {\n        protected SmsNotificationBase(string storeId, Language language)\n            : base(storeId, language)\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/NumericRange.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Common\n{\n    public class NumericRange : ValueObject\n    {\n        public decimal? Lower { get; set; }\n        public decimal? Upper { get; set; }\n        public bool IncludeLower { get; set; }\n        public bool IncludeUpper { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/ObjectExtensions.cs",
    "content": "using System;\nusing System.Collections.Specialized;\nusing System.ComponentModel;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class ObjectExtensions\n    {\n        public static void CopyFrom(this object obj, NameValueCollection source)\n        {\n            if (obj == null)\n            {\n                throw new ArgumentNullException(nameof(obj));\n            }\n            var objType = obj.GetType();\n\n            foreach (var key in source.AllKeys)\n            {\n                var prop = objType.GetProperty(key);\n                if (prop != null)\n                {\n                    if (prop.PropertyType.IsEnum)\n                    {\n                        prop.SetValue(obj, Enum.Parse(prop.PropertyType, source[key]), null);\n                    }\n                    else\n                    {\n                        var typeConverter = TypeDescriptor.GetConverter(prop.PropertyType);\n                        if (typeConverter != null)\n                        {\n                            var propValue = typeConverter.ConvertFromString(source[key]);\n                            prop.SetValue(obj, propValue, null);\n                        }\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/PagedSearchCriteria.cs",
    "content": "using System;\nusing System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public class PagedSearchCriteria : ValueObject\n    {\n        public PagedSearchCriteria(IDictionary<string, string> queryString, int defaultPageSize)\n        {\n            PageNumber = Convert.ToInt32(queryString[\"page\"] ?? 1.ToString());\n            PageSize = Convert.ToInt32(queryString[\"count\"] ?? queryString[\"page_size\"] ?? defaultPageSize.ToString());\n        }\n\n        public int Start\n        {\n            get\n            {\n                return (PageNumber - 1) * PageSize;\n            }\n        }\n\n        public int PageNumber { get; set; }\n        public int PageSize { get; set; }\n\n        public virtual IEnumerable<KeyValuePair<string, string>> GetQueryKeyValues()\n        {\n            yield return new KeyValuePair<string, string>(\"page\", PageNumber.ToString());\n            yield return new KeyValuePair<string, string>(\"page_size\", PageSize.ToString());\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/PathUtils.cs",
    "content": "using System.IO;\nusing System.Linq;\nusing Microsoft.Extensions.Primitives;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class PathUtils\n    {\n        private static readonly char[] _invalidFileNameChars = Path.GetInvalidFileNameChars().Where(c => c != Path.DirectorySeparatorChar && c != Path.AltDirectorySeparatorChar).ToArray();\n\n        private static readonly char[] _invalidFilterChars = _invalidFileNameChars.Where(c => c != '*' && c != '|' && c != '?').ToArray();\n\n        private static readonly char[] _pathSeparators = new[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };\n\n        public static bool HasInvalidPathChars(string path)\n        {\n            return path.IndexOfAny(_invalidFileNameChars) != -1;\n        }\n\n        public static bool HasInvalidFilterChars(string path)\n        {\n            return path.IndexOfAny(_invalidFilterChars) != -1;\n        }\n\n        public static string EnsureTrailingSlash(string path)\n        {\n            if (!string.IsNullOrEmpty(path) &&\n                path[^1] != Path.DirectorySeparatorChar)\n            {\n                return path + Path.DirectorySeparatorChar;\n            }\n\n            return path;\n        }\n\n        public static bool PathNavigatesAboveRoot(string path)\n        {\n            var tokenizer = new StringTokenizer(path, _pathSeparators);\n            var depth = 0;\n            foreach (var segment in tokenizer)\n            {\n                if (segment.Equals(\"..\"))\n                {\n                    depth--;\n                    if (depth == -1)\n                    {\n                        return true;\n                    }\n                }\n                else if (!segment.Equals(\".\") && !segment.Equals(\"\"))\n                {\n                    depth++;\n                }\n            }\n\n            return false;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/ReflectionExtension.cs",
    "content": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class ReflectionExtension\n    {\n        public static IEnumerable<PropertyInfo> GetTypePropsRecursively(this Type baseType, Func<PropertyInfo, bool> predicate)\n        {\n            return IteratePropsInner(baseType, predicate);\n        }\n\n        private static IEnumerable<PropertyInfo> IteratePropsInner(Type baseType, Func<PropertyInfo, bool> predicate)\n        {\n            var props = baseType.GetProperties(BindingFlags.Instance | BindingFlags.Public);\n\n            foreach (var property in props.Where(x => predicate(x)))\n            {\n                var type = ListTypesOrSelf(property.PropertyType);\n\n                foreach (var info in IteratePropsInner(type, predicate))\n                {\n                    yield return info;\n                }\n\n                yield return property;\n            }\n        }\n\n        public static Type ListTypesOrSelf(Type type)\n        {\n            return !type.IsGenericType ? type : type.GetGenericArguments()[0];\n        }\n\n        public static Type GetEnumerableType(this Type type)\n        {\n            return (from intType in type.GetInterfaces() where intType.IsGenericType && intType.GetGenericTypeDefinition() == typeof(IEnumerable<>) select intType.GetGenericArguments()[0]).FirstOrDefault();\n        }\n\n        public static bool IsAssignableFromGenericList(this Type type)\n        {\n            return type.GetInterfaces().Any(intType => intType.IsGenericType && intType.GetGenericTypeDefinition() == typeof(IList<>));\n        }\n\n        public static T[] GetFlatObjectsListWithInterface<T>(this object obj, List<T> resultList = null)\n        {\n            var retVal = new List<T>();\n\n            resultList ??= new List<T>();\n            //Ignore cycling references\n            if (resultList.Any(x => object.ReferenceEquals(x, obj)))\n            {\n                return retVal.ToArray();\n            }\n\n            var objectType = obj.GetType();\n\n            if (objectType.GetInterface(typeof(T).Name) != null)\n            {\n                retVal.Add((T)obj);\n                resultList.Add((T)obj);\n            }\n\n            var properties = objectType.GetProperties(BindingFlags.Public | BindingFlags.Instance);\n\n            var objects = properties.Where(x => x.PropertyType.GetInterface(typeof(T).Name) != null)\n                .Select(x => (T)x.GetValue(obj)).ToList();\n\n            //Recursive call for single properties\n            retVal.AddRange(\n                objects.Where(x => x != null).SelectMany(x => x.GetFlatObjectsListWithInterface(resultList)));\n\n            //Handle collection and arrays\n            var collections = properties.Where(p => p.GetIndexParameters().Length == 0)\n                .Select(x => x.GetValue(obj, null))\n                .Where(x => x is IEnumerable && !(x is string))\n                .Cast<IEnumerable>();\n\n            foreach (var collection in collections)\n            {\n                foreach (var collectionObject in collection)\n                {\n                    if (collectionObject is T)\n                    {\n                        retVal.AddRange(collectionObject.GetFlatObjectsListWithInterface(resultList));\n                    }\n                }\n            }\n\n            return retVal.ToArray();\n        }\n\n        public static IDictionary<string, object> AsDictionary(this object source, Func<string, string> nameNormalizer = null, BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance)\n        {\n            return source.GetType().GetProperties(bindingAttr).ToDictionary\n            (\n                propInfo => nameNormalizer != null ? nameNormalizer(propInfo.Name) : propInfo.Name,\n                propInfo => propInfo.GetValue(source, null)\n            );\n\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/SettingsExtension.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class SettingsExtension\n    {\n        public static T GetSettingValue<T>(this IEnumerable<SettingEntry> settings, string settingName, T defaulValue)\n        {\n            var retVal = defaulValue;\n            var setting = settings.FirstOrDefault(x => x.Name.Equals(settingName, StringComparison.OrdinalIgnoreCase));\n            if (setting != null && setting.Value != null)\n            {\n                retVal = (T)Convert.ChangeType(setting.Value, typeof(T), CultureInfo.InvariantCulture);\n            }\n            return retVal;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/SortInfo.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    //\n    // Summary:\n    //     Specifies the direction in which to sort a list of items.\n    public enum SortDirection\n    {\n        //\n        // Summary:\n        //     Sort from smallest to largest. For example, from A to Z.\n        Ascending = 0,\n        //\n        // Summary:\n        //     Sort from largest to smallest. For example, from Z to A.\n        Descending = 1\n    }\n\n    public sealed class SortInfo : ValueObject\n    {\n        public override string ToString()\n        {\n            return SortColumn + \"-\" + (SortDirection == SortDirection.Descending ? \"desc\" : \"asc\");\n        }\n        public static string ToString(IEnumerable<SortInfo> sortInfos)\n        {\n            if (!sortInfos.IsNullOrEmpty())\n            {\n                return string.Join(\";\", sortInfos);\n            }\n            return string.Empty;\n        }\n        public static IEnumerable<SortInfo> Parse(string sortExpr)\n        {\n            var retVal = new List<SortInfo>();\n\n            if (string.IsNullOrEmpty(sortExpr))\n            {\n                return retVal;\n            }\n\n            var sortInfoStrings = sortExpr.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);\n            foreach (var sortInfoString in sortInfoStrings)\n            {\n                var parts = sortInfoString.Split(new[] { ':', '-' }, StringSplitOptions.RemoveEmptyEntries);\n                if (parts.Any())\n                {\n                    var sortInfo = new SortInfo\n                    {\n                        SortColumn = parts[0].Trim(),\n                        SortDirection = SortDirection.Ascending\n                    };\n                    if (parts.Count() > 1)\n                    {\n                        sortInfo.SortDirection = parts[1].Trim().StartsWith(\"desc\", StringComparison.InvariantCultureIgnoreCase) ? SortDirection.Descending : SortDirection.Ascending;\n                    }\n                    retVal.Add(sortInfo);\n                }\n            }\n            return retVal;\n        }\n\n        public string SortColumn { get; set; }\n\n        public SortDirection SortDirection { get; set; }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/Specifications/ISpecification.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Common.Specifications\n{\n    public interface ISpecification<in T>\n    {\n        bool IsSatisfiedBy(T obj);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/StreamExtensions.cs",
    "content": "using System;\nusing System.IO;\nusing System.Threading.Tasks;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class StreamExtensions\n    {\n        public static void CopyTo(this Stream fromStream, Stream toStream)\n        {\n            if (fromStream == null)\n            {\n                throw new ArgumentNullException(\"fromStream\");\n            }\n            if (toStream == null)\n            {\n                throw new ArgumentNullException(\"toStream\");\n            }\n\n            var bytes = new byte[8092];\n            int dataRead;\n            while ((dataRead = fromStream.Read(bytes, 0, bytes.Length)) > 0)\n            {\n                toStream.Write(bytes, 0, dataRead);\n            }\n        }\n\n        public static byte[] ReadFully(this Stream stream)\n        {\n            var buffer = new byte[16 * 1024];\n            using var ms = new MemoryStream();\n            int read;\n            while ((read = stream.Read(buffer, 0, buffer.Length)) > 0)\n            {\n                ms.Write(buffer, 0, read);\n            }\n            return ms.ToArray();\n        }\n\n        public static string ReadToString(this Stream stream)\n        {\n            // convert stream to string\n            using var reader = new StreamReader(stream);\n            return reader.ReadToEnd();\n        }\n\n        public static async Task<string> ReadToStringAsync(this Stream stream)\n        {\n            // convert stream to string\n            using var reader = new StreamReader(stream);\n            return await reader.ReadToEndAsync();\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/StringExtensions.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Text.RegularExpressions;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class StringExtensions\n    {\n        private static readonly Regex _validJsonPath = new Regex(@\"^[a-zA-Z0-9]\\w*(\\.@?[a-zA-Z_]\\w*)*$\", RegexOptions.Compiled);\n        private static readonly Regex _regexIllegal = new Regex(@\"[\\[, \\]]\", RegexOptions.Compiled);\n        private static readonly Regex _regex1 = new Regex(@\"([A-Z]+)([A-Z][a-z])\", RegexOptions.Compiled);\n        private static readonly Regex _regex2 = new Regex(@\"([a-z\\d])([A-Z])\", RegexOptions.Compiled);\n        private static readonly Regex _emailRegex = new Regex(@\"^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-||_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+([a-z]+|\\d|-|\\.{0,1}|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])?([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$\", RegexOptions.IgnoreCase, TimeSpan.FromSeconds(1));\n        private static readonly char[] _maskChars = { '*', '?' };\n        public static string PascalToKebabCase(this string name)\n        {\n            if (name == null)\n            {\n                throw new ArgumentNullException(nameof(name));\n            }\n            name = _regexIllegal.Replace(name, \"_\").TrimEnd('_');\n            // Replace any capital letters, apart from the first character, with _x, the same way Ruby does\n            return _regex2.Replace(_regex1.Replace(name, \"$1_$2\"), \"$1_$2\").ToLower();\n        }\n\n        public static bool IsValidJsonPath(this string input)\n        {\n            if (input == null)\n            {\n                throw new ArgumentNullException(nameof(input));\n            }\n            return _validJsonPath.IsMatch(input);\n        }\n\n        public static bool IsValidEmail(this string input)\n        {\n            if (input == null)\n            {\n                throw new ArgumentNullException(nameof(input));\n            }\n            return _emailRegex.IsMatch(input);\n        }\n\n        public static string JoinWithoutWhitespaces(this IEnumerable<string> inputs, string separator)\n        {\n            if (inputs == null)\n            {\n                throw new ArgumentNullException(nameof(inputs));\n            }\n            var result = string.Join(separator, inputs.Where(v => !string.IsNullOrWhiteSpace(v)).Select(v => v.Trim()));\n            return !string.IsNullOrEmpty(result) ? result : null;\n        }\n\n        /// <summary>\n        /// http://stackoverflow.com/questions/484085/an-algorithm-to-spacify-camelcased-strings\n        /// </summary>\n        /// <param name=\"str\"></param>\n        /// <param name=\"spacer\"></param>\n        /// <returns></returns>\n        public static string Decamelize(this string str, char spacer = '_')\n        {\n            if (string.IsNullOrEmpty(str))\n            {\n                return str;\n            }\n\n            /* Note that the .ToString() is required, otherwise the char is implicitly\n             * converted to an integer and the wrong overloaded ctor is used */\n            var sb = new StringBuilder(str[0].ToString());\n            for (var i = 1; i < str.Length; i++)\n            {\n                if (char.IsUpper(str, i))\n                {\n                    sb.Append(spacer);\n                }\n\n                sb.Append(str[i]);\n            }\n            return sb.ToString().ToLowerInvariant();\n        }\n\n        /// <summary>\n        /// Equals invariant\n        /// </summary>\n        /// <param name=\"str1\">The STR1.</param>\n        /// <param name=\"str2\">The STR2.</param>\n        /// <returns></returns>\n        public static bool EqualsInvariant(this string str1, string str2)\n        {\n            return string.Equals(str1, str2, StringComparison.OrdinalIgnoreCase);\n        }\n\n        public static bool FilePathHasMaskChars(this string path)\n        {\n            return (!string.IsNullOrEmpty(path) && path.IndexOfAny(_maskChars) >= 0);\n        }\n\n        public static string AddIfNotContains(this string inputStr, string str, char separator = ',')\n        {\n            if (inputStr == null)\n            {\n                throw new ArgumentNullException(nameof(inputStr));\n            }\n            var strHashSet = inputStr.Split(separator, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim()).ToHashSet(StringComparer.OrdinalIgnoreCase);\n            strHashSet.Add(str);\n            return string.Join(separator, strHashSet);\n        }\n\n        public static bool FitsMask(this string fileName, string fileMask)\n        {\n            var mask = new Regex(\"^\" + Regex.Escape(fileMask).Replace(\"\\\\.\", \"[.]\").Replace(\"\\\\*\", \".*\").Replace(\"\\\\?\", \".\") + \"$\", RegexOptions.IgnoreCase);\n            return mask.IsMatch(fileName);\n        }\n\n        public static int? ToNullableInt(this string str)\n        {\n            if (int.TryParse(str, out var retVal))\n            {\n                return retVal;\n            }\n            return null;\n        }\n\n        public static Tuple<string, string, string> SplitIntoTuple(this string input, char separator)\n        {\n            if (input == null)\n            {\n                throw new ArgumentNullException(\"input\");\n            }\n\n            var pieces = input.Split(separator);\n            return Tuple.Create(pieces.FirstOrDefault(), pieces.Skip(1).FirstOrDefault(), pieces.Skip(2).FirstOrDefault());\n        }\n\n        public static string RemoveAccent(this string txt)\n        {\n            var bytes = Encoding.ASCII.GetBytes(txt);\n            return Encoding.ASCII.GetString(bytes);\n        }\n\n        public static string Handelize(this string phrase)\n        {\n            var retVal = phrase;\n            if (phrase != null)\n            {\n                retVal = phrase.ToLower();\n\n                retVal = Regex.Replace(retVal, @\"[^\\p{L}\\d\\s-]\", \"\"); // invalid chars           \n                retVal = Regex.Replace(retVal, @\"\\s+\", \" \").Trim(); // convert multiple spaces into one space   \n                retVal = retVal.Substring(0, retVal.Length <= 240 ? retVal.Length : 240).Trim(); // cut and trim it   \n                retVal = Regex.Replace(retVal, @\"\\s\", \"-\"); // hyphens   \n            }\n            return retVal;\n        }\n\n        //http://www.ietf.org/rfc/rfc3986.txt\n        //section 4.2 Relative reference\n        //Remove leading protocol scheme from uri. http://host/path -> //host/path\n        public static string RemoveLeadingUriScheme(this string str)\n        {\n            if (!string.IsNullOrEmpty(str) && Uri.IsWellFormedUriString(str, UriKind.Absolute))\n            {\n                //remove scheme from image url\n                //http://www.ietf.org/rfc/rfc3986.txt\n                //section 4.2\n                var uri = new Uri(str);\n                str = \"//\" + uri.Authority + uri.PathAndQuery;\n            }\n            return str;\n        }\n\n        public static string ReplaceLastOccurrence(this string source, string find, string replace)\n        {\n            var place = source.LastIndexOf(find);\n            var result = source;\n            if (place >= 0)\n            {\n                result = source.Remove(place, find.Length).Insert(place, replace);\n            }\n            return result;\n        }\n        /// <summary>\n        /// Add provided suffix to the end of file name\n        /// </summary>\n        /// <param name=\"originalFileUrl\">File url</param>\n        /// <param name=\"suffix\">Suffix</param>\n        /// Example: \"1428965138000_1133723.jpg\".AddSuffixToFileUrl(\"grande\") \n        /// Result: 1428965138000_1133723_grande.jpg\n        /// <returns></returns>\n        public static string AddSuffixToFileUrl(this string originalFileUrl, string suffix)\n        {\n            if (originalFileUrl == null)\n            {\n                throw new ArgumentNullException(nameof(originalFileUrl));\n            }\n            var result = originalFileUrl;\n            var fileName = Path.GetFileName(originalFileUrl);\n            if (!string.IsNullOrEmpty(fileName))\n            {\n                var newFileName = Path.GetFileNameWithoutExtension(fileName) + suffix;\n                var extension = Path.GetExtension(fileName);\n                if (!string.IsNullOrEmpty(extension))\n                {\n                    newFileName += extension;\n                }\n                result = result.ReplaceLastOccurrence(fileName, newFileName);\n            }\n            return result;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/TreeNode.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public partial class TreeNode\n    {\n        public string Path { get; set; }\n\n        public int Level { get; set; }\n\n        public string Title { get; set; }\n\n        public int? Priority { get; set; }\n\n        public IList<TreeNode> Children { get; set; } = new List<TreeNode>();\n\n        public string ParentPath { get; set; }\n\n        public TreeNode Parent { get; set; }\n\n        public IList<TreeNode> Parents\n        {\n            get\n            {\n                var parents = new TreeNode[] { };\n\n                if (Parent != null)\n                {\n                    parents = Parent.Parents.Concat(new[] { Parent }).ToArray();\n                }\n\n                return parents;\n            }\n        }\n\n        public IList<TreeNode> AllChildren { get; set; } = new List<TreeNode>();\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/TypeExtensions.cs",
    "content": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nusing System.Text;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public static class TypeExtensions\n    {\n        public static Type[] GetTypeInheritanceChainTo(this Type type, Type toBaseType)\n        {\n            var retVal = new List<Type> { type };\n\n            var baseType = type.BaseType;\n\n            while (baseType != toBaseType && baseType != typeof(object))\n            {\n                retVal.Add(baseType);\n                baseType = baseType.BaseType;\n            }\n\n            return retVal.ToArray();\n        }\n\n        private static readonly ConcurrentDictionary<Type, string> PrettyPrintCache = new ConcurrentDictionary<Type, string>();\n\n        public static string PrettyPrint(this Type type)\n        {\n            return PrettyPrintCache.GetOrAdd(\n                type,\n                t =>\n                {\n                    try\n                    {\n                        return PrettyPrintRecursive(t, 0);\n                    }\n                    catch (Exception)\n                    {\n                        return t.Name;\n                    }\n                });\n        }\n\n        private static readonly ConcurrentDictionary<Type, string> TypeCacheKeys = new ConcurrentDictionary<Type, string>();\n        public static string GetCacheKey(this Type type)\n        {\n            return TypeCacheKeys.GetOrAdd(type, t => $\"{t.PrettyPrint()}\");\n        }\n\n        private static string PrettyPrintRecursive(Type type, int depth)\n        {\n            if (depth > 3)\n            {\n                return type.Name;\n            }\n\n            var nameParts = type.Name.Split('`');\n            if (nameParts.Length == 1)\n            {\n                return nameParts[0];\n            }\n\n            var genericArguments = type.GetTypeInfo().GetGenericArguments();\n            return !type.IsConstructedGenericType\n                ? $\"{nameParts[0]}<{new string(',', genericArguments.Length - 1)}>\"\n                : $\"{nameParts[0]}<{string.Join(\",\", genericArguments.Select(t => PrettyPrintRecursive(t, depth + 1)))}>\";\n        }\n\n        public static string FriendlyId(this Type type, bool fullyQualified = false)\n        {\n            var typeName = fullyQualified\n                ? type.FullNameSansTypeParameters().Replace(\"+\", \".\")\n                : type.Name;\n\n            if (type.IsGenericType)\n            {\n                var genericArgumentIds = type.GetGenericArguments()\n                    .Select(t => t.FriendlyId(fullyQualified))\n                    .ToArray();\n\n                return new StringBuilder(typeName)\n                    .Replace($\"`{genericArgumentIds.Count()}\", string.Empty)\n                    .Append($\"[{string.Join(\",\", genericArgumentIds).TrimEnd(',')}]\")\n                    .ToString();\n            }\n\n            return typeName;\n        }\n\n        public static string FullNameSansTypeParameters(this Type type)\n        {\n            var fullName = type.FullName ?? type.Name;\n            var chopIndex = fullName.IndexOf(\"[[\", StringComparison.OrdinalIgnoreCase);\n\n            return chopIndex == -1\n                ? fullName\n                : fullName.Substring(0, chopIndex);\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Common/ValueObject.cs",
    "content": "using System;\nusing System.Collections;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\n\nnamespace VirtoCommerce.Storefront.Model.Common\n{\n    public abstract class ValueObject : IValueObject, ICacheKey, ICloneable\n    {\n        private static readonly ConcurrentDictionary<Type, IReadOnlyCollection<PropertyInfo>> TypeProperties = new ConcurrentDictionary<Type, IReadOnlyCollection<PropertyInfo>>();\n\n        public override bool Equals(object obj)\n        {\n            if (ReferenceEquals(this, obj))\n            {\n                return true;\n            }\n\n            if (obj is null)\n            {\n                return false;\n            }\n\n            if (GetType() != obj.GetType())\n            {\n                return false;\n            }\n\n            var other = obj as ValueObject;\n            return other != null && GetEqualityComponents().SequenceEqual(other.GetEqualityComponents());\n        }\n\n        public override int GetHashCode()\n        {\n            unchecked\n            {\n                return GetEqualityComponents().Aggregate(17, (current, obj) => current * 23 + (obj?.GetHashCode() ?? 0));\n            }\n        }\n\n#pragma warning disable S3875 // \"operator==\" should not be overloaded on reference types\n        public static bool operator ==(ValueObject left, ValueObject right)\n#pragma warning restore S3875 // \"operator==\" should not be overloaded on reference types\n        {\n            return Equals(left, right);\n        }\n\n        public static bool operator !=(ValueObject left, ValueObject right)\n        {\n            return !Equals(left, right);\n        }\n\n        public override string ToString()\n        {\n            return $\"{{{string.Join(\", \", GetProperties().Select(f => $\"{f.Name}: {f.GetValue(this)}\"))}}}\";\n        }\n\n        public virtual string GetCacheKey()\n        {\n            var keyValues = GetEqualityComponents()\n                .Select(x => x is string ? $\"'{x}'\" : x)\n                .Select(x => x is ICacheKey cacheKey ? cacheKey.GetCacheKey() : x?.ToString());\n\n            return string.Join(\"|\", keyValues);\n        }\n\n        protected virtual IEnumerable<object> GetEqualityComponents()\n        {\n            foreach (var property in GetProperties())\n            {\n                var value = property.GetValue(this);\n                if (value == null)\n                {\n                    yield return null;\n                }\n                else\n                {\n                    var valueType = value.GetType();\n                    if (valueType.IsAssignableFromGenericList())\n                    {\n                        yield return '[';\n                        foreach (var child in ((IEnumerable)value))\n                        {\n                            yield return child;\n                        }\n                        yield return ']';\n                    }\n                    else\n                    {\n                        yield return value;\n                    }\n                }\n            }\n        }\n\n        protected virtual IEnumerable<PropertyInfo> GetProperties()\n        {\n            return TypeProperties.GetOrAdd(\n                GetType(),\n                t => t\n                    .GetTypeInfo()\n                    .GetProperties(BindingFlags.Instance | BindingFlags.Public)\n                    .OrderBy(p => p.Name)\n                    .ToList());\n        }\n\n        #region ICloneable members\n        public virtual object Clone()\n        {\n            return MemberwiseClone();\n        }\n        #endregion\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/ContactForm.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public partial class ContactForm : ValueObject\n    {\n        public ContactForm()\n        {\n            Contact = new Dictionary<string, string[]>();\n        }\n\n        public IDictionary<string, string[]> Contact { get; set; }\n\n        public string FormType { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Country.cs",
    "content": "namespace VirtoCommerce.Storefront.Model\n{\n    public partial class Country\n    {\n        public string Name { get; set; }\n        public string Code2 { get; set; }\n        public string Code3 { get; set; }\n        public CountryRegion[] Regions { get; set; }\n        public string RegionType { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/CountryRegion.cs",
    "content": "namespace VirtoCommerce.Storefront.Model\n{\n    public partial class CountryRegion\n    {\n        public string Name { get; set; }\n        public string Code { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Customer/Contact.cs",
    "content": "using System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.Customer\n{\n    /// <summary>\n    /// Represent customer information structure \n    /// </summary>\n    public partial class Contact : Member\n    {\n        public string FullName { get; set; }\n        /// <summary>\n        /// Returns the first name of the customer.\n        /// </summary>\n        public string FirstName { get; set; }\n        /// <summary>\n        /// Returns the last name of the customer.\n        /// </summary>\n        public string LastName { get; set; }\n\n        public string MiddleName { get; set; }\n\n        public string Salutation { get; set; }\n\n        public string Status { get; set; }\n\n        public string PhotoUrl { get; set; }\n\n        public string TimeZone { get; set; }\n        public string DefaultLanguage { get; set; }\n\n        public Address DefaultBillingAddress { get; set; }\n        public Address DefaultShippingAddress { get; set; }\n\n        public string OrganizationId { get; set; }\n        public Organization Organization { get; set; }\n\n        public IList<string> OrganizationsIds { get; set; } = new List<string>();\n\n        /// <summary>\n        /// Returns true if the customer accepts marketing, returns false if the customer does not.\n        /// </summary>\n        public bool AcceptsMarketing { get; set; }\n\n        /// <summary>\n        /// Returns the default customer_address.\n        /// </summary>\n        public Address DefaultAddress { get; set; }\n\n        /// <summary>\n        /// All contact security accounts\n        /// </summary>\n        public IEnumerable<SecurityAccount> SecurityAccounts { get; set; }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Customer/Member.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\nusing Newtonsoft.Json;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.Customer\n{\n    public class Member : Entity\n    {\n        public IList<string> PhoneNumbers { get; set; } = new List<string>();\n        public string Email\n        {\n            get\n            {\n                return Emails.OrderBy(x => x).FirstOrDefault();\n            }\n        }\n\n        /// <summary>\n        /// Returns the email address of the customer.\n        /// </summary>\n        public IList<string> Emails { get; set; } = new List<string>();\n\n        public string Name { get; set; }\n        public string MemberType { get; set; }\n        public IList<Address> Addresses { get; set; } = new List<Address>();\n        public IList<string> Phones { get; set; } = new List<string>();\n        public IList<string> Groups { get; set; } = new List<string>();\n\n        /// <summary>\n        /// User groups such as VIP, Wholesaler etc\n        /// </summary>\n        public IList<string> UserGroups { get; set; } = new List<string>();\n\n        [JsonIgnore]\n        [IgnoreDataMember]\n        public IMutablePagedList<DynamicProperty> DynamicProperties { get; set; } = new MutablePagedList<DynamicProperty>(Enumerable.Empty<DynamicProperty>());\n\n        public override string ToString()\n        {\n            return $\"{MemberType} {Name}\";\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Customer/Organization.cs",
    "content": "using System.Runtime.Serialization;\nusing Newtonsoft.Json;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.Customer\n{\n    public partial class Organization : Member\n    {\n        /// <summary>\n        /// Organization contacts\n        /// </summary>\n        [JsonIgnore]\n        [IgnoreDataMember]\n        public IMutablePagedList<Contact> Contacts { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Customer/OrganizationContactsSearchCriteria.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.Customer\n{\n    public class OrganizationContactsSearchCriteria : PagedSearchCriteria\n    {\n\n        public static int DefaultPageSize { get; set; } = 20;\n\n        public OrganizationContactsSearchCriteria()\n            : base(new Dictionary<string, string>().WithDefaultValue(null), DefaultPageSize)\n        {\n        }\n\n        public OrganizationContactsSearchCriteria(IDictionary<string, string> queryString)\n            : base(queryString, DefaultPageSize)\n        {\n        }\n        public string OrganizationId { get; set; }\n        public string Sort { get; set; }\n        public string SearchPhrase { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Customer/SecurityAccount.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.Customer\n{\n    public class SecurityAccount : Entity\n    {\n        public string UserName { get; set; }\n        public bool IsLockedOut { get; set; }\n        public IList<string> Roles { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Customer/Services/IMemberService.cs",
    "content": "using System.Collections.Generic;\nusing System.Threading.Tasks;\nusing PagedList.Core;\n\nnamespace VirtoCommerce.Storefront.Model.Customer.Services\n{\n    public interface IMemberService\n    {\n        Task<Contact> GetContactByIdAsync(string contactId);\n        Task<Contact> CreateContactAsync(Contact contact);\n        Task UpdateContactAsync(Contact contact);\n        Task UpdateContactAddressesAsync(string contactId, IList<Address> addresses);\n        Task DeleteContactAsync(string contactId);\n\n        IPagedList<Contact> SearchOrganizationContacts(OrganizationContactsSearchCriteria criteria);\n        Task<IPagedList<Contact>> SearchOrganizationContactsAsync(OrganizationContactsSearchCriteria criteria);\n\n        Task<Organization> GetOrganizationByIdAsync(string organizationId);\n        Task<Organization> CreateOrganizationAsync(Organization organization);\n        Task UpdateOrganizationAsync(Organization organization);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/DynamicProperty.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public partial class DynamicProperty : Entity, IAccessibleByIndexKey\n    {\n        public string Name { get; set; }\n\n        public LocalizedString DisplayName { get; set; }\n        public IList<LocalizedString> DisplayNames { get; set; } = new List<LocalizedString>();\n        /// <summary>\n        /// Defines whether a property supports multiple values.\n        /// </summary>\n        public bool IsArray { get; set; }\n        /// <summary>\n        /// Dictionary has a predefined set of values. User can select one or more of them and cannot enter arbitrary values.\n        /// </summary>\n        public bool IsDictionary { get; set; }\n\n        public bool IsRequired { get; set; }\n\n        public string ValueType { get; set; }\n\n        //Selected scalar values\n        public IList<LocalizedString> Values { get; set; } = new List<LocalizedString>();\n        //Selected dictionary values\n        public IList<DynamicPropertyDictionaryItem> DictionaryValues { get; set; } = new List<DynamicPropertyDictionaryItem>();\n        //All possible dictionary values\n        public IList<DynamicPropertyDictionaryItem> DictionaryItems { get; set; } = new List<DynamicPropertyDictionaryItem>();\n\n        public string IndexKey => Name;\n    }\n\n\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/DynamicPropertyDictionaryItem.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public partial class DynamicPropertyDictionaryItem : Entity\n    {\n        public string PropertyId { get; set; }\n        public string Name { get; set; }\n        public string DisplayName { get; set; }\n        public IList<LocalizedString> DisplayNames { get; set; } = new List<LocalizedString>();\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/DynamicPropertyName.cs",
    "content": "namespace VirtoCommerce.Storefront.Model\n{\n    public partial class DynamicPropertyName\n    {\n        /// <summary>\n        /// Gets or Sets Locale\n        /// </summary>\n        public string Locale { get; set; }\n\n        /// <summary>\n        /// Gets or Sets Name\n        /// </summary>\n        public string Name { get; set; }\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/EditorialReview.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public partial class EditorialReview : LocalizedString, IAccessibleByIndexKey\n    {\n        public string ReviewType { get; set; }\n        public string Content => Value;\n\n        public string IndexKey => ReviewType;\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Features/Exceptions/FeaturesException.cs",
    "content": "using System;\nusing System.Runtime.Serialization;\n\nnamespace VirtoCommerce.Storefront.Model.Features.Exceptions\n{\n    [Serializable]\n    public class FeaturesException : Exception\n    {\n        [Obsolete(DiagnosticId = \"SYSLIB0051\")]\n        protected FeaturesException(SerializationInfo info, StreamingContext context) : base(info, context)\n        {\n        }\n\n        public FeaturesException(string message)\n            : base(message)\n        {\n        }\n\n        public FeaturesException(string message, Exception exception)\n            : base(message, exception)\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Features/Feature.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Features\n{\n    using System.Collections.Generic;\n\n    public class Feature\n    {\n        public List<string> Conflicts { get; set; }\n\n        public bool IsActive { get; set; }\n\n        public string Name { get; set; }\n\n        public List<string> Replaces { get; set; }\n\n        public List<string> Requires { get; set; }\n\n        public override string ToString()\n        {\n            return Name;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Features/FeatureExtensions.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Features\n{\n    using System.Collections.Generic;\n    using System.Linq;\n\n    using VirtoCommerce.Storefront.Model.Features.Exceptions;\n\n    public static class FeatureExtensions\n    {\n        public static bool AnyConflictWith(this IReadOnlyCollection<Feature> features, string featureName)\n        {\n            return features.Any(feature => feature.IsActive && feature.Conflicts.Contains(featureName));\n        }\n\n        public static bool AnyInactive(this IEnumerable<Feature> features)\n        {\n            return features.Any(feature => !feature.IsActive);\n        }\n\n        public static bool AnyReplacedBy(this IReadOnlyCollection<Feature> features, string featureName)\n        {\n            return features.Any(feature => feature.IsActive && feature.Replaces.Contains(featureName));\n        }\n\n        public static Feature GetFeature(this IReadOnlyCollection<Feature> features, string featureName)\n        {\n            var result = features.FirstOrDefault(feature => feature.Name == featureName);\n\n            if (result == null)\n            {\n                throw new FeaturesException($\"Can't find the future \\\"{featureName}\\\"\");\n            }\n\n            return result;\n        }\n\n        public static IEnumerable<Feature> GetReferenceFeatures(\n            this Feature targetFeature,\n            IReadOnlyCollection<Feature> features)\n        {\n            return features.Where(feature => feature.Requires.Contains(targetFeature.Name));\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Features/FeaturesAgent.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Features\n{\n    using System;\n    using System.Collections.Generic;\n\n    using Newtonsoft.Json.Linq;\n\n    using VirtoCommerce.Storefront.Model.Features.Exceptions;\n\n    public class FeaturesAgent : IFeaturesAgent\n    {\n        private readonly string _featuresBranchToken;\n\n        public FeaturesAgent(string featuresBranchToken = \"features\")\n        {\n            _featuresBranchToken = featuresBranchToken;\n        }\n\n        public bool IsActive(string featureName, JObject jObject)\n        {\n            var features = GetFeatures(jObject);\n\n            var feature = features.GetFeature(featureName);\n\n            if (!feature.IsActive)\n            {\n                return false;\n            }\n\n            bool result;\n            var replaced = features.AnyReplacedBy(feature.Name);\n            var conflict = features.AnyConflictWith(feature.Name);\n\n            if (replaced || conflict)\n            {\n                result = false;\n            }\n            else\n            {\n                var referenceFeatures = feature.GetReferenceFeatures(features);\n                result = !referenceFeatures.AnyInactive();\n            }\n\n            return result;\n        }\n\n        private List<Feature> GetFeatures(JObject jObject)\n        {\n            List<Feature> result;\n\n            try\n            {\n                var featuresJson = jObject[_featuresBranchToken];\n\n                if (featuresJson == null)\n                {\n                    throw new FeaturesException($\"Can' find \\\"{_featuresBranchToken}\\\" section \");\n                }\n\n                result = featuresJson.ToObject<List<Feature>>();\n            }\n            catch (Exception exception)\n            {\n                throw new FeaturesException(exception.Message, exception);\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Features/IFeaturesAgent.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Features\n{\n    using Newtonsoft.Json.Linq;\n\n    public interface IFeaturesAgent\n    {\n        bool IsActive(string featureName, JObject jObject);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Form.cs",
    "content": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public partial class Form : IDictionary\n    {\n        private readonly IDictionary<string, object> _dict;\n\n        public Form()\n            : this(new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase).WithDefaultValue(null))\n        {\n        }\n\n        private Form(IDictionary<string, object> dict)\n        {\n            _dict = dict;\n            Errors = new List<FormError>();\n            PostedSuccessfully = true;\n        }\n\n        public static Form FromObject(object obj)\n        {\n            var dict = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase).WithDefaultValue(null);\n            var formProps = obj.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);\n            foreach (var property in formProps)\n            {\n                var propertyValue = property.GetValue(obj);\n                if (propertyValue != null)\n                {\n                    dict[property.Name.PascalToKebabCase()] = propertyValue;\n                }\n            }\n            return new Form(dict);\n        }\n\n        public void Add(object key, object value)\n        {\n            throw new NotImplementedException();\n        }\n\n        public void Clear()\n        {\n            throw new NotImplementedException();\n        }\n\n        public bool Contains(object key)\n        {\n            return TryGetValue(key, out _);\n        }\n\n        public IDictionaryEnumerator GetEnumerator()\n        {\n            throw new NotImplementedException();\n        }\n\n        public void Remove(object key)\n        {\n            throw new NotImplementedException();\n        }\n\n        public void CopyTo(Array array, int index)\n        {\n            throw new NotImplementedException();\n        }\n\n        IEnumerator IEnumerable.GetEnumerator()\n        {\n            throw new NotImplementedException();\n        }\n\n        /// <summary>\n        /// Returns an array of errors if the form was not submitted successfully.\n        /// The error returned depend on which fields of the form were left empty or contained errors.\n        /// </summary>\n        public IList<FormError> Errors { get { return _dict[\"errors\"] as IList<FormError>; } set { _dict[\"errors\"] = value; } }\n\n        /// <summary>\n        /// Returns true if the form was submitted successfully, or false if the form contained errors.\n        /// All forms but the address form set that property.\n        /// The address form is always submitted successfully.\n        /// </summary>\n        public bool? PostedSuccessfully { get { return _dict[\"posted_successfully\"] as bool?; } set { _dict[\"posted_successfully\"] = value; } }\n\n        public bool IsFixedSize => false;\n\n        public bool IsReadOnly => false;\n\n        public ICollection Keys => throw new NotImplementedException();\n\n        public ICollection Values => throw new NotImplementedException();\n\n        public int Count => _dict.Count();\n\n        public bool IsSynchronized => false;\n\n        public object SyncRoot => _dict;\n\n        public object this[object key]\n        {\n            get\n            {\n                TryGetValue(key, out var result);\n                return result;\n            }\n            set\n            {\n                throw new NotImplementedException();\n            }\n        }\n\n        private bool TryGetValue(object key, out object value)\n        {\n            if (key == null)\n            {\n                throw new ArgumentNullException(nameof(key));\n            }\n\n            value = null;\n\n            if (key is string stringKey)\n            {\n                if (stringKey == \"size\")\n                {\n                    value = Count;\n                }\n                else\n                {\n                    value = _dict[stringKey];\n                }\n            }\n\n            return value != null;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/FormError.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public class FormError : ValueObject, IAccessibleByIndexKey\n    {\n        public string Code { get; set; }\n        public string Message => Description;\n        public string Description { get; set; }\n        public string UserId { get; set; }\n\n        public override string ToString()\n        {\n            return Description;\n        }\n        public string IndexKey => Code;\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/ICountriesService.cs",
    "content": "using System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public interface ICountriesService\n    {\n        Task<IList<Country>> GetCountriesAsync();\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/ICurrencyService.cs",
    "content": "using System.Threading.Tasks;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public interface ICurrencyService\n    {\n        Task<Currency[]> GetAllCurrenciesAsync(Language language);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/IHasLanguage.cs",
    "content": "namespace VirtoCommerce.Storefront.Model\n{\n    public interface IHasLanguage\n    {\n        Language Language { get; }\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/IHasSettings.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public interface IHasSettings\n    {\n        IMutablePagedList<SettingEntry> Settings { get; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/ISeoInfoService.cs",
    "content": "using System.Threading.Tasks;\nusing VirtoCommerce.Storefront.Model.StaticContent;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public interface ISeoInfoService\n    {\n        Task<SeoInfo[]> GetSeoInfosBySlug(string slug);\n\n        Task<SeoInfo[]> GetBestMatchingSeoInfos(string slug, Store store, string currentCulture);\n\n        ContentItem GetContentItem(string slug, WorkContext context);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/ISpaRouteService.cs",
    "content": "using System.Threading.Tasks;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public interface ISpaRouteService\n    {\n        Task<bool> IsSpaRoute(string route);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/IWorkContextAccessor.cs",
    "content": "namespace VirtoCommerce.Storefront.Model\n{\n    public interface IWorkContextAccessor\n    {\n        WorkContext WorkContext { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Image.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public partial class Image : ValueObject\n    {\n        /// <summary>\n        /// Full url of image\n        /// </summary>\n        public string Url { get; set; }\n\n        public string FullSizeImageUrl { get; set; }\n\n        /// <summary>\n        /// Image title\n        /// </summary>\n        public string Title { get; set; }\n        public string Name => Title;\n\n        /// <summary>\n        /// Image alt text\n        /// </summary>\n        public string Alt { get; set; }\n\n        public int? SortOrder { get; set; }\n        public string Group { get; set; }\n        public string LanguageCode { get; set; }\n\n        protected override IEnumerable<object> GetEqualityComponents()\n        {\n            yield return Url;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Interaction/Client.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Interaction\n{\n    public class Client\n    {\n        public string Name { get; set; }\n\n        public int InnerWidth { get; set; }\n\n        public int InnerHeight { get; set; }\n\n        public int OuterWidth { get; set; }\n\n        public int OuterHeight { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Interaction/Page.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Interaction\n{\n    public class Page\n    {\n        public string Location { get; set; }\n\n        public string Href { get; set; }\n\n        public string Origin { get; set; }\n\n        public string Title { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Interaction/UserEvent.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Model.Interaction\n{\n    public class UserEvent\n    {\n        public string Type { get; set; }\n\n        public string Event { get; set; }\n\n        public string TargetTag { get; set; }\n\n        public string TargetClasses { get; set; }\n\n        public string Content { get; set; }\n\n        public DateTime? CreatedAt { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Interaction/UserSession.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Model.Interaction\n{\n    public class UserSession\n    {\n        public DateTime? LoadTime { get; set; }\n\n        public DateTime? UnloadTime { get; set; }\n\n        public string Language { get; set; }\n\n        public string Platform { get; set; }\n\n        public string Port { get; set; }\n\n        public Client ClientStart { get; set; }\n\n        public Page Page { get; set; }\n\n        public string Endpoint { get; set; }\n\n        public UserEvent[] Interactions { get; set; }\n\n        public Client ClientEnd { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Language.cs",
    "content": "using System.Collections.Generic;\nusing System.Globalization;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    /// <summary>\n    /// Represent language for specified culture\n    /// </summary>\n    public partial class Language : ValueObject\n    {\n        private Language()\n            : this(CultureInfo.InvariantCulture.Name)\n        {\n        }\n\n        public Language(string cultureName)\n        {\n            var culture = CultureInfo.InvariantCulture;\n            if (!string.IsNullOrEmpty(cultureName))\n            {\n                culture = CultureInfo.GetCultureInfo(cultureName);\n            }\n\n            CultureName = culture.Name;\n            ThreeLetterLanguageName = culture.ThreeLetterISOLanguageName;\n            TwoLetterLanguageName = culture.TwoLetterISOLanguageName;\n            NativeName = culture.NativeName;\n            if (!culture.IsNeutralCulture && culture != CultureInfo.InvariantCulture)\n            {\n                var regionInfo = new RegionInfo(cultureName);\n                TwoLetterRegionName = regionInfo.TwoLetterISORegionName;\n                ThreeLetterRegionName = regionInfo.ThreeLetterISORegionName;\n            }\n        }\n\n        public static Language InvariantLanguage\n        {\n            get\n            {\n                return new Language();\n            }\n        }\n\n        public bool IsInvariant\n        {\n            get\n            {\n                return CultureName == CultureInfo.InvariantCulture.Name;\n            }\n        }\n        /// <summary>\n        /// culture name format (e.g. en-US)\n        /// </summary>\n        public string CultureName { get; private set; }\n        public string NativeName { get; private set; }\n        /// <summary>\n        ///  Gets the ISO 639-2 three-letter code for the language \n        /// </summary>\n        public string ThreeLetterLanguageName { get; private set; }\n        /// <summary>\n        ///   Gets the ISO 639-1 two-letter code for the language\n        /// </summary>\n        public string TwoLetterLanguageName { get; private set; }\n        /// <summary>\n        ///  Gets the two-letter code defined in ISO 3166 for the country/region.\n        /// </summary>\n        public string TwoLetterRegionName { get; private set; }\n        /// <summary>\n        ///  Gets the three-letter code defined in ISO 3166 for the country/region.\n        /// </summary>\n        public string ThreeLetterRegionName { get; private set; }\n\n        protected override IEnumerable<object> GetEqualityComponents()\n        {\n            yield return CultureName;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/LinkList/CategoryMenuLink.cs",
    "content": "namespace VirtoCommerce.Storefront.Model\n{\n    /// <summary>\n    /// Represent menu link  associated to category \n    /// </summary>\n    public class CategoryMenuLink : MenuLink\n    {\n        public override string Type => \"collection\";\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/LinkList/MenuLink.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    /// <summary>\n    /// Represents site navigation menu link object\n    /// </summary>\n    public class MenuLink : Entity, IAccessibleByIndexKey\n    {\n        /// <summary>\n        /// Gets or sets the title of site navigation menu link\n        /// </summary>\n        public string Title { get; set; }\n\n        /// <summary>\n        /// Returns the type of the link. The possible values are:\n        /// collection: if the link points to a collection\n        /// product: if the link points to a product page   \n        /// </summary>\n        public virtual string Type => AssociatedObjectType;\n        /// <summary>\n        /// Gets or sets the URL of site navigation menu link\n        /// </summary>        \n        public string Url { get; set; }\n\n        /// <summary>\n        /// Gets or sets the priority of site navigation menu link\n        /// </summary>\n        public int Priority { get; set; }\n\n        /// <summary>\n        /// Each link element can has a associated object like a Product, Category, Promotion etc.\n        /// Is a primary key for associated object\n        /// </summary>\n        public string AssociatedObjectId { get; set; }\n\n        /// <summary>\n        /// Associated object type\n        /// </summary>\n        public string AssociatedObjectType { get; set; }\n\n        public string IndexKey => Id;\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/LinkList/MenuLinkList.cs",
    "content": "using System.Collections.Generic;\nusing Newtonsoft.Json;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    /// <summary>\n    /// Represents site navigation menu link list object\n    /// </summary>\n    public class MenuLinkList : Entity, IHasLanguage, IAccessibleByIndexKey\n    {\n        /// <summary>\n        /// Gets or sets the name of site navigation menu link list\n        /// </summary>\n        public string Name { get; set; }\n        public string Title => Name;\n        public string Handle => Name?.Handelize();\n\n        /// <summary>\n        /// Gets or sets the site navigation menu link list store ID\n        /// </summary>\n        public string StoreId { get; set; }\n\n        /// <summary>\n        /// Gets or sets the collection of site navigation menu link for link list\n        /// </summary>\n        public IList<MenuLink> MenuLinks { get; set; } = new List<MenuLink>();\n        [JsonIgnore]\n        public IList<MenuLink> Links => MenuLinks;\n\n        #region IHasLanguage Members\n        /// <summary>\n        /// Gets or sets the locale of site navigation menu link list\n        /// </summary>\n        public Language Language { get; set; }\n\n        #endregion\n\n        public string IndexKey => Handle;\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/LinkList/ProductMenuLink.cs",
    "content": "namespace VirtoCommerce.Storefront.Model\n{\n    /// <summary>\n    /// Represent menu link  associated to product \n    /// </summary>\n    public class ProductMenuLink : MenuLink\n    {\n        public override string Type => \"product\";\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/LinkList/Services/ILinkListService.cs",
    "content": "using System.Collections.Generic;\nusing System.Threading.Tasks;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Model.LinkList.Services\n{\n    public interface IMenuLinkListService\n    {\n        IList<MenuLinkList> LoadAllStoreLinkLists(Store store, Language language);\n        Task<IList<MenuLinkList>> LoadAllStoreLinkListsAsync(Store store, Language language);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/LocalizedString.cs",
    "content": "namespace VirtoCommerce.Storefront.Model\n{\n    public class LocalizedString : IHasLanguage\n    {\n        public LocalizedString()\n        {\n            Language = Language.InvariantLanguage;\n            Value = null;\n        }\n        public LocalizedString(Language language, string value)\n        {\n            Language = language;\n            Value = value;\n\n        }\n\n        public string Value { get; set; }\n\n        #region IHasLanguage Members\n        public Language Language { get; set; }\n        #endregion\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/LoginProvider.cs",
    "content": "using System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public class LoginProvider\n    {\n        public string AuthenticationType { get; set; }\n\n        public string Caption { get; set; }\n\n        public IDictionary<string, object> Properties { get; set; }\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/AccountState.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Security\n{\n    public enum AccountState\n    {\n        PendingApproval,\n        Approved,\n        Rejected\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/ChangePassword.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public partial class ChangePassword : ValueObject\n    {\n        public string OldPassword { get; set; }\n        public string NewPassword { get; set; }\n        public string NewPasswordConfirm { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/ChangeTwoFactorAuthenticationModel.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Security\n{\n    public class ChangeTwoFactorAuthenticationModel\n    {\n        public bool Enabled { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/ChangeTwoFactorAuthenticationResult.cs",
    "content": "using System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public class ChangeTwoFactorAuthenticationResult\n    {\n        public bool? Succeeded { get; set; }\n        public IEnumerable<string> Errors { get; set; }\n        public string VerificationUrl { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/ConfirmEmailModel.cs",
    "content": "using System.ComponentModel.DataAnnotations;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public class ConfirmEmailModel\n    {\n        [Required(ErrorMessage = \"A UserId is required\")]\n        public string UserId { get; set; }\n\n        [Required(ErrorMessage = \"A Token is required\")]\n        public string Token { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/CustomSignInResult.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Security\n{\n    public class CustomSignInResult : Microsoft.AspNetCore.Identity.SignInResult\n    {\n        public bool IsRejected { get; protected set; }\n\n        public static CustomSignInResult Rejected => new CustomSignInResult { IsRejected = true };\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/Events/UserDeletedEvent.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common.Events;\n\nnamespace VirtoCommerce.Storefront.Model.Security.Events\n{\n    public class UserDeletedEvent : DomainEvent\n    {\n        public UserDeletedEvent(WorkContext workContext, User user)\n        {\n            WorkContext = workContext;\n            User = user;\n        }\n\n        public WorkContext WorkContext { get; set; }\n        public User User { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/Events/UserLoginEvent.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common.Events;\n\nnamespace VirtoCommerce.Storefront.Model.Security.Events\n{\n    /// <summary>\n    /// Event generated when user logged in to the storefront\n    /// </summary>\n    public partial class UserLoginEvent : DomainEvent\n    {\n        public UserLoginEvent(WorkContext workContext, User user)\n        {\n            WorkContext = workContext;\n            User = user;\n        }\n\n        public WorkContext WorkContext { get; set; }\n        public User User { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/Events/UserRegisteredEvent.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common.Events;\n\nnamespace VirtoCommerce.Storefront.Model.Security.Events\n{\n    public class UserRegisteredEvent : DomainEvent\n    {\n        public UserRegisteredEvent(WorkContext workContext, User user, UserRegistration registration)\n        {\n            WorkContext = workContext;\n            User = user;\n            UserRegistration = registration;\n        }\n\n        public WorkContext WorkContext { get; set; }\n        public User User { get; set; }\n        public UserRegistration UserRegistration { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/ExternalUserLoginInfo.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public class ExternalUserLoginInfo : ValueObject\n    {\n\n        //  Examples of the provider may be Local, Facebook, Google, etc.\n        public string LoginProvider { get; set; }\n        //\n        // Summary:\n        //     Gets or sets the unique identifier for the user identity user provided by the\n        //     login provider.\n        //\n        // Remarks:\n        //     This would be unique per provider, examples may be @microsoft as a Twitter provider\n        //     key.\n        public string ProviderKey { get; set; }\n        //\n        // Summary:\n        //     Gets or sets the display name for the provider.\n        public string ProviderDisplayName { get; set; }\n\n        protected override IEnumerable<object> GetEqualityComponents()\n        {\n            yield return LoginProvider;\n            yield return ProviderKey;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/ForgotPassword.cs",
    "content": "using System.ComponentModel.DataAnnotations;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public partial class ForgotPassword : ValueObject\n    {\n        [Required(ErrorMessage = \"A Email is required\")]\n        public string Email { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/ForgotPasswordModel.cs",
    "content": "using System.ComponentModel.DataAnnotations;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public class ForgotPasswordModel\n    {\n        [Required(ErrorMessage = \"A Email is required\")]\n        public string Email { get; set; }\n\n        [Required(ErrorMessage = \"URL is required\")]\n        public string ResetPasswordUrl { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/Login.cs",
    "content": "using System.ComponentModel.DataAnnotations;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n\n    public partial class Login\n    {\n        [EmailAddress]\n        public string Email { get; set; }\n\n\n        public string UserName { get; set; }\n\n        [Required]\n        public string Password { get; set; }\n\n        public bool RememberMe { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/OrganizationRegistration.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Security\n{\n    public partial class OrganizationRegistration : UserRegistration\n    {\n\n        public string OrganizationName { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/OrganizationUserRegistration.cs",
    "content": "using System.ComponentModel.DataAnnotations;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public partial class OrganizationUserRegistration : UserRegistration\n    {\n        [Required]\n        public string Role { get; set; }\n        [Required]\n        public string OrganizationId { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/PasswordChangeResult.cs",
    "content": "using System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public class PasswordChangeResult\n    {\n        public bool? Succeeded { get; set; }\n        public IList<FormError> Errors { get; set; } = new List<FormError>();\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/RemovePhoneNumberResult.cs",
    "content": "using System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public class RemovePhoneNumberResult\n    {\n        public bool? Succeeded { get; set; }\n        public IEnumerable<string> Errors { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/ResetPassword.cs",
    "content": "using System.ComponentModel.DataAnnotations;\nusing Microsoft.AspNetCore.Mvc;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public partial class ResetPassword\n    {\n        [FromForm(Name = \"customer[email]\")]\n        public string Email { get; set; }\n\n        [FromForm(Name = \"customer[user_name]\")]\n        public string UserName { get; set; }\n\n        [Required(ErrorMessage = \"A Token is required\")]\n        [FromForm(Name = \"customer[token]\")]\n        public string Token { get; set; }\n\n        [Required(ErrorMessage = \"A Password is required\")]\n        [FromForm(Name = \"customer[password]\")]\n        public string Password { get; set; }\n\n        [Required(ErrorMessage = \"A Password confirmation is required\")]\n        [FromForm(Name = \"customer[password_confirmation]\")]\n        public string PasswordConfirmation { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/ResetPasswordByCodeModel.cs",
    "content": "using System.ComponentModel.DataAnnotations;\nusing Microsoft.AspNetCore.Mvc;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public class ResetPasswordByCodeModel\n    {\n        [Required(ErrorMessage = \"An Email is required\")]\n        [FromForm(Name = \"customer[email]\")]\n        public string Email { get; set; }\n\n        [Required(ErrorMessage = \"A Code is required\")]\n        [FromForm(Name = \"customer[code]\")]\n        public string Code { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/ResetPasswordModel.cs",
    "content": "using System.ComponentModel.DataAnnotations;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public class ResetPasswordModel\n    {\n        [Required(ErrorMessage = \"A Token is required\")]\n        public string UserId { get; set; }\n\n        [Required(ErrorMessage = \"A Token is required\")]\n        public string Token { get; set; }\n\n        [Required(ErrorMessage = \"A Password is required\")]\n        public string Password { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/Role.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public class Role : Entity\n    {\n        public string Name { get; set; }\n        public IList<string> Permissions { get; set; } = new List<string>();\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/SecurityConstants.cs",
    "content": "using System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public static class SecurityConstants\n    {\n        public const string AnonymousUsername = \"Anonymous\";\n\n        public static class Claims\n        {\n            public const string PermissionClaimType = \"permission\";\n            public const string OperatorUserNameClaimType = \"operatorname\";\n            public const string OperatorUserIdClaimType = \"operatornameidentifier\";\n            public const string CurrencyClaimType = \"currency\";\n        }\n\n        public static class Roles\n        {\n            public const string Customer = \"Customer\";\n            public const string Operator = \"Operator\";\n            public const string Administrator = \"Administrator\";\n            public static readonly Role OrganizationMaintainer = new Role\n            {\n                Id = \"org-maintainer\",\n                Name = \"Organization maintainer\",\n                Permissions = new string[] { Permissions.CanViewUsers, Permissions.CanCreateUsers, Permissions.CanSeeOrganizationDetail, Permissions.CanDeleteUsers, Permissions.CanEditOrganization, Permissions.CanEditUsers, Permissions.CanInviteUsers }\n            };\n            public static readonly Role OrganizationEmployee = new Role\n            {\n                Id = \"org-employee\",\n                Name = \"Organization employee\",\n                Permissions = new string[] { Permissions.CanSeeOrganizationDetail, Permissions.CanViewUsers }\n            };\n            public static readonly Role PurchasingAgent = new Role\n            {\n                Id = \"purchasing-agent\",\n                Name = \"Purchasing agent\",\n                Permissions = new string[] { Permissions.CanSeeOrganizationDetail, Permissions.CanViewUsers }\n            };\n\n            public static readonly Role StoreAdministrator = new Role\n            {\n                Id = \"store-admin\",\n                Name = \"Store administrator\",\n                Permissions = new string[] { Permissions.CanViewUsers, Permissions.CanCreateUsers, Permissions.CanSeeOrganizationDetail, Permissions.CanDeleteUsers, Permissions.CanEditOrganization, Permissions.CanEditUsers, Permissions.CanInviteUsers, Permissions.CanViewOrders, Permissions.CanChangeOrderStatus }\n            };\n            public static readonly Role StoreManager = new Role\n            {\n                Id = \"store-manager\",\n                Name = \"Store manager\",\n                Permissions = new string[] { Permissions.CanSeeOrganizationDetail, Permissions.CanViewOrders, Permissions.CanChangeOrderStatus }\n            };\n\n            public static readonly IEnumerable<Role> AllRoles = new[] { OrganizationMaintainer, OrganizationEmployee, PurchasingAgent, StoreAdministrator, StoreManager };\n            public static readonly IEnumerable<Role> B2BRoles = new[] { OrganizationMaintainer, OrganizationEmployee, PurchasingAgent };\n        }\n\n        public static class Permissions\n        {\n            public const string CanResetCache = \"cache:reset\";\n            public const string CanSeeOrganizationDetail = \"storefront:organization:view\";\n            public const string CanEditOrganization = \"storefront:organization:edit\";\n            public const string CanInviteUsers = \"storefront:user:invite\";\n            public const string CanCreateUsers = \"storefront:user:create\";\n            public const string CanEditUsers = \"storefront:user:edit\";\n            public const string CanDeleteUsers = \"storefront:user:delete\";\n            public const string CanViewUsers = \"storefront:user:view\";\n            public const string CanViewOrders = \"storefront:order:view\";\n            public const string CanChangeOrderStatus = \"storefront:order:changestatus\";\n            public static readonly IEnumerable<string> AllPermissions = new[] { CanViewUsers, CanResetCache, CanSeeOrganizationDetail, CanEditOrganization, CanInviteUsers, CanEditUsers, CanDeleteUsers, CanCreateUsers, CanViewOrders, CanChangeOrderStatus };\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/SecurityErrorDescriber.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public static partial class SecurityErrorDescriber\n    {\n        public static FormError UsernameOrEmailIsRequired()\n        {\n            return new FormError\n            {\n                Code = nameof(UsernameOrEmailIsRequired).PascalToKebabCase(),\n                Description = \"Please provide a username or email\"\n            };\n        }\n        public static FormError LoginFailed()\n        {\n            return new FormError\n            {\n                Code = nameof(LoginFailed).PascalToKebabCase(),\n                Description = \"Login attempt failed. Please check your credentials.\"\n            };\n        }\n\n        public static FormError UserNotFound()\n        {\n            return new FormError\n            {\n                Code = nameof(UserNotFound).PascalToKebabCase(),\n                Description = \"User not found. Please ensure you've entered the correct information.\"\n            };\n        }\n        public static FormError UserCannotLoginInStore()\n        {\n            return new FormError\n            {\n                Code = nameof(UserCannotLoginInStore).PascalToKebabCase(),\n                Description = \"Access denied. You cannot sign in to the current store\"\n            };\n        }\n\n        public static FormError PhoneNumberNotFound()\n        {\n            return new FormError\n            {\n                Code = nameof(PhoneNumberNotFound).PascalToKebabCase(),\n                Description = \"Password reset failed. Phone number not found for verification.\"\n            };\n        }\n\n        public static FormError AccountIsBlocked()\n        {\n            return new FormError\n            {\n                Code = nameof(AccountIsBlocked).PascalToKebabCase(),\n                Description = \"Your account has been blocked. Please contact support for assistance.\"\n            };\n        }\n\n        public static FormError EmailVerificationIsRequired()\n        {\n            return new FormError\n            {\n                Code = nameof(EmailVerificationIsRequired).PascalToKebabCase(),\n                Description = \"Email verification required. Please verify your email address.\"\n            };\n        }\n\n        public static FormError OperationFailed()\n        {\n            return new FormError\n            {\n                Code = nameof(OperationFailed).PascalToKebabCase(),\n                Description = \"Oops, something went wrong. The operation could not be completed.\"\n            };\n        }\n\n        public static FormError ResetPasswordIsTurnedOff()\n        {\n            return new FormError\n            {\n                Code = nameof(ResetPasswordIsTurnedOff).PascalToKebabCase(),\n                Description = \"Password reset by code is currently unavailable.\"\n            };\n        }\n\n        public static FormError InvalidToken()\n        {\n            return new FormError\n            {\n                Code = nameof(InvalidToken).PascalToKebabCase(),\n                Description = \"Sorry, the token is invalid or has expired. Please request a new one.\"\n            };\n        }\n        public static FormError InvalidUrl()\n        {\n            return new FormError\n            {\n                Code = nameof(InvalidUrl).PascalToKebabCase(),\n                Description = \"The URL you provided is not valid.\"\n            };\n        }\n        public static FormError ResetPasswordInvalidData()\n        {\n            return new FormError\n            {\n                Code = nameof(ResetPasswordInvalidData).PascalToKebabCase(),\n                Description = \"Password reset data is invalid. Please try again.\"\n            };\n        }\n        public static FormError PasswordAndConfirmPasswordDoesNotMatch()\n        {\n            return new FormError\n            {\n                Code = nameof(PasswordAndConfirmPasswordDoesNotMatch).PascalToKebabCase(),\n                Description = \"Passwords don't match. Please ensure both passwords are the same.\"\n            };\n        }\n        public static FormError InvitationHasAreadyBeenUsed()\n        {\n            return new FormError\n            {\n                Code = nameof(InvitationHasAreadyBeenUsed).PascalToKebabCase(),\n                Description = \"This invitation has already been used. Please contact the sender if you need assistance.\"\n            };\n        }\n        public static FormError PhoneNumberVerificationFailed()\n        {\n            return new FormError\n            {\n                Code = nameof(PhoneNumberVerificationFailed).PascalToKebabCase(),\n                Description = \"Phone number verification failed. Please try again or contact support.\"\n            };\n        }\n        public static FormError ErrorSendNotification(string error)\n        {\n            return new FormError\n            {\n                Code = nameof(ErrorSendNotification).PascalToKebabCase(),\n                Description = error\n            };\n        }\n        public static FormError UserIsLockedOut()\n        {\n            return new FormError\n            {\n                Code = nameof(UserIsLockedOut).PascalToKebabCase(),\n                Description = \"Your account has been locked. Please contact support for assistance.\"\n            };\n        }\n        public static FormError UserIsTemporaryLockedOut()\n        {\n            return new FormError\n            {\n                Code = nameof(UserIsLockedOut).PascalToKebabCase(),\n                Description = \"Your account has been temporarily locked. Please try again after some time.\"\n            };\n        }\n        public static FormError PasswordExpired(string userId)\n        {\n            return new FormError\n            {\n                Code = nameof(PasswordExpired).PascalToKebabCase(),\n                UserId = userId,\n                Description = \"Your password has been expired and must be changed.\"\n            };\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/Specifications/CanUserLoginToStoreSpecification.cs",
    "content": "using System;\nusing System.Linq;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Specifications;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Model.Security.Specifications\n{\n    public class CanUserLoginToStoreSpecification : ISpecification<Store>\n    {\n        private readonly User _user;\n        public CanUserLoginToStoreSpecification(User user)\n        {\n            _user = user;\n        }\n        public virtual bool IsSatisfiedBy(Store obj)\n        {\n            if (obj == null)\n            {\n                throw new ArgumentNullException(nameof(obj));\n            }\n            //Allow to login to store for administrators or for users not assigned to store\n            var result = _user.IsAdministrator || _user.StoreId.IsNullOrEmpty();\n            if (!result)\n            {\n                result = obj.TrustedGroups.Concat(new[] { obj.Id }).Contains(_user.StoreId);\n            }\n            return result;\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/Specifications/IsUserLockedByRequiredEmailVerificationSpecification.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Common.Specifications;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Model.Security.Specifications\n{\n    public class IsUserLockedByRequiredEmailVerificationSpecification : ISpecification<Store>\n    {\n        private readonly User _user;\n\n        public IsUserLockedByRequiredEmailVerificationSpecification(User user)\n        {\n            _user = user;\n        }\n\n        public virtual bool IsSatisfiedBy(Store store)\n        {\n            return _user.Contact.Status == \"Locked\"\n                && !_user.EmailConfirmed\n                && store.Settings.GetSettingValue<bool>(\"Stores.EmailVerificationEnabled\", false)\n                && store.Settings.GetSettingValue<bool>(\"Stores.EmailVerificationRequired\", false);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/Specifications/IsUserLockedOutSpecification.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common.Specifications;\n\nnamespace VirtoCommerce.Storefront.Model.Security.Specifications\n{\n    public class IsUserLockedOutSpecification : ISpecification<User>\n    {\n        public virtual bool IsSatisfiedBy(User obj)\n        {\n            return obj.IsLockedOut;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/Specifications/IsUserPasswordExpiredSpecification.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common.Specifications;\n\nnamespace VirtoCommerce.Storefront.Model.Security.Specifications\n{\n    public class IsUserPasswordExpiredSpecification : ISpecification<User>\n    {\n        public virtual bool IsSatisfiedBy(User obj)\n        {\n            return obj.PasswordExpired;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/Specifications/IsUserSuspendedSpecification.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common.Specifications;\n\nnamespace VirtoCommerce.Storefront.Model.Security.Specifications\n{\n    public class IsUserSuspendedSpecification : ISpecification<User>\n    {\n        public bool IsSatisfiedBy(User obj)\n        {\n            return obj.UserState == AccountState.Rejected;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/Specifications/IsUserTemporaryLockedOutSpecification.cs",
    "content": "using System;\nusing VirtoCommerce.Storefront.Model.Common.Specifications;\n\nnamespace VirtoCommerce.Storefront.Model.Security.Specifications\n{\n    public class IsUserTemporaryLockedOutSpecification : ISpecification<User>\n    {\n        public virtual bool IsSatisfiedBy(User user)\n        {\n            return user.LockoutEndDateUtc != DateTime.MaxValue.ToUniversalTime();\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/UpdatePhoneNumberModel.cs",
    "content": "using System.ComponentModel.DataAnnotations;\nusing Microsoft.AspNetCore.Mvc;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public class UpdatePhoneNumberModel\n    {\n        [Required]\n        [FromForm(Name = \"customer[phoneNumber]\")]\n        [Phone]\n        public string PhoneNumber { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/UpdatePhoneNumberResult.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Security\n{\n    public class UpdatePhoneNumberResult\n    {\n        public bool? Succeeded { get; set; }\n        public string Error { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/User.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\nusing Newtonsoft.Json;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Customer;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public partial class User : Entity\n    {\n        public User()\n        {\n            ExternalLogins = new List<ExternalUserLoginInfo>();\n        }\n\n        /// <summary>\n        /// Store id\n        /// </summary>\n        public string StoreId { get; set; }\n        /// <summary>\n        /// Security account user name\n        /// </summary>\n        public string UserName { get; set; }\n        public string NormalizedUserName { get; set; }\n        public string Password { get; set; }\n        public bool PasswordExpired { get; set; }\n        [JsonIgnore]\n        [IgnoreDataMember]\n        public string PasswordHash { get; set; }\n        [JsonIgnore]\n        [IgnoreDataMember]\n        public string SecurityStamp { get; set; }\n        public string PhoneNumber { get; set; }\n        public bool PhoneNumberConfirmed { get; set; }\n        /// <summary>\n        /// Returns the email address of the customer.\n        /// </summary>\n        public string Email { get; set; }\n        public string NormalizedEmail { get; set; }\n\n        public bool EmailConfirmed { get; set; }\n\n        public string DefaultLanguage { get; set; }\n\n        public bool TwoFactorEnabled { get; set; }\n\n        public string TwoFactorAuthenticatorKey { get; set; }\n\n        public bool IsLockedOut\n        {\n            get\n            {\n                return LockoutEndDateUtc != null && LockoutEndDateUtc.Value > DateTime.UtcNow;\n            }\n        }\n\n        /// <summary>\n        ///  Used to record failures for the purposes of lockout\n        /// </summary>\n        public virtual int AccessFailedCount { get; set; }\n        /// <summary>\n        /// Is lockout enabled for this user\n        /// </summary>\n        public virtual bool LockoutEnabled { get; set; }\n        /// <summary>\n        /// DateTime in UTC when lockout ends, any time in the past is considered not locked out.\n        /// </summary>\n        public virtual DateTime? LockoutEndDateUtc { get; set; }\n        /// <summary>\n        /// DateTime in UTC when last login happened\n        /// </summary>\n        public virtual DateTime? LastLoginDate { get; set; }\n        /// <summary>\n        /// Returns true if user authenticated  returns false if it anonymous. \n        /// </summary>\n        public bool IsRegisteredUser { get; set; }\n        /// <summary>\n        /// The flag indicates that the user is an administrator \n        /// </summary>\n        public bool IsAdministrator { get; set; }\n\n        public string UserType { get; set; }\n\n        /// <summary>\n        /// Represents user status.\n        /// </summary>\n        public string Status { get; set; }\n\n        public AccountState UserState { get; set; }\n        /// <summary>\n        /// The user ID of an operator who has loggen in on behalf of a customer\n        /// </summary>\n        public string OperatorUserId { get; set; }\n        /// <summary>\n        /// The user name of an operator who has loggen in on behalf of a customer\n        /// </summary>\n        public string OperatorUserName { get; set; }\n        /// <summary>\n        /// The user full name of an operator who has loggen in on behalf of a customer\n        /// </summary>\n        public string OperatorFullName { get; set; }\n\n        public IList<ExternalUserLoginInfo> ExternalLogins { get; set; }\n\n        //Selected and persisted currency code\n        public string SelectedCurrencyCode { get; set; }\n\n        public string ContactId { get; set; }\n        /// <summary>\n        /// Member associated with user \n        /// </summary>\n        public Contact Contact { get; set; }\n\n        /// <summary>\n        /// All user permissions\n        /// </summary>\n        public IEnumerable<string> Permissions { get; set; }\n\n        /// <summary>\n        /// Single user role\n        /// </summary>\n        public Role Role\n        {\n            get\n            {\n                return Roles?.FirstOrDefault();\n            }\n        }\n        /// <summary>\n        /// All user roles\n        /// </summary>\n        public IEnumerable<Role> Roles { get; set; }\n\n\n        public IMutablePagedList<DynamicProperty> DynamicProperties => Contact?.DynamicProperties;\n\n        public string FirstName => Contact?.FirstName;\n        public string LastName => Contact?.LastName;\n        public string MiddleName => Contact?.MiddleName;\n        public string Name => Contact?.FullName;\n        public string TimeZone => Contact?.TimeZone;\n        public Address DefaultAddress => Contact?.DefaultAddress;\n        public Address DefaultBillingAddress => Contact?.DefaultBillingAddress;\n        public Address DefaultShippingAddress => Contact?.DefaultShippingAddress;\n        public IList<Address> Addresses => Contact?.Addresses;\n        /// <summary>\n        /// Indicates that user has no orders\n        /// </summary>\n        public bool IsFirstTimeBuyer { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/UserActionIdentityResult.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\nusing Microsoft.AspNetCore.Identity;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public class UserActionIdentityResult\n    {\n        private static readonly UserActionIdentityResult _success = new UserActionIdentityResult { Succeeded = true };\n        private List<IdentityError> _errors = new List<IdentityError>();\n\n        /// <summary>\n        /// Flag indicating whether if the operation succeeded or not.\n        /// </summary>\n        /// <value>True if the operation succeeded, otherwise false.</value>\n        public bool Succeeded { get; protected set; }\n\n        /// <summary>\n        /// An <see cref=\"IEnumerable{T}\"/> of <see cref=\"IdentityError\"/>s containing an errors\n        /// that occurred during the identity operation.\n        /// </summary>\n        /// <value>An <see cref=\"IEnumerable{T}\"/> of <see cref=\"IdentityError\"/>s.</value>\n        public IEnumerable<IdentityError> Errors => _errors;\n\n        /// <summary>\n        /// Returns an <see cref=\"IdentityResult\"/> indicating a successful identity operation.\n        /// </summary>\n        /// <returns>An <see cref=\"IdentityResult\"/> indicating a successful operation.</returns>\n        public static UserActionIdentityResult Success => _success;\n\n        public string MemberId { get; set; }\n\n        public string ReturnUrl { get; set; }\n        /// <summary>\n        /// \n        /// </summary>\n        /// <param name=\"identityResult\"></param>\n        /// <returns></returns>\n        public static UserActionIdentityResult Instance(IdentityResult identityResult)\n        {\n            var result = new UserActionIdentityResult\n            {\n                Succeeded = identityResult.Succeeded,\n                _errors = identityResult.Errors.ToList()\n            };\n\n            return result;\n        }\n\n        /// <summary>\n        /// Creates an <see cref=\"IdentityResult\"/> indicating a failed identity operation, with a list of <paramref name=\"errors\"/> if applicable.\n        /// </summary>\n        /// <param name=\"errors\">An optional array of <see cref=\"IdentityError\"/>s which caused the operation to fail.</param>\n        /// <returns>An <see cref=\"IdentityResult\"/> indicating a failed identity operation, with a list of <paramref name=\"errors\"/> if applicable.</returns>\n        public static UserActionIdentityResult Failed(params IdentityError[] errors)\n        {\n            var result = new UserActionIdentityResult { Succeeded = false };\n            if (errors != null)\n            {\n                result._errors.AddRange(errors);\n            }\n            return result;\n        }\n\n        public static UserActionIdentityResult Failed(params FormError[] errors)\n        {\n            var result = new UserActionIdentityResult { Succeeded = false };\n            if (errors != null)\n            {\n                result._errors.AddRange(errors.Select(x => new IdentityError { Code = x.Code, Description = x.Description }));\n            }\n            return result;\n        }\n\n        /// <summary>\n        /// Converts the value of the current <see cref=\"IdentityResult\"/> object to its equivalent string representation.\n        /// </summary>\n        /// <returns>A string representation of the current <see cref=\"IdentityResult\"/> object.</returns>\n        /// <remarks>\n        /// If the operation was successful the ToString() will return \"Succeeded\" otherwise it returned \n        /// \"Failed : \" followed by a comma delimited list of error codes from its <see cref=\"Errors\"/> collection, if any.\n        /// </remarks>\n        public override string ToString()\n        {\n            return Succeeded ?\n                \"Succeeded\" :\n                string.Format(\"{0} : {1}\", \"Failed\", string.Join(\",\", Errors.Select(x => x.Code).ToList()));\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/UserRegistration.cs",
    "content": "using System;\nusing System.ComponentModel.DataAnnotations;\nusing Microsoft.AspNetCore.Mvc;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public partial class UserRegistration\n    {\n        [FromForm(Name = \"customer[photoUrl]\")]\n        public string PhotoUrl { get; set; }\n\n        [FromForm(Name = \"customer[first_name]\")]\n        public string FirstName { get; set; }\n\n        [FromForm(Name = \"customer[full_name]\")]\n        public string FullName { get; set; }\n\n        [FromForm(Name = \"customer[last_name]\")]\n        public string LastName { get; set; }\n\n        [FromForm(Name = \"customer[email]\")]\n        [EmailAddress]\n        public string Email { get; set; }\n\n        [FromForm(Name = \"customer[user_name]\")]\n        [Required]\n        public string UserName { get; set; }\n\n        [FromForm(Name = \"customer[password]\")]\n        [Required]\n        public string Password { get; set; }\n\n        [FromForm(Name = \"customer[store_id]\")]\n        public string StoreId { get; set; }\n\n        [FromForm(Name = \"customer[name]\")]\n        public string Name { get; set; }\n\n        [FromForm(Name = \"customer[address]\")]\n        public Address Address { get; set; }\n        [FromForm(Name = \"customer[salutation]\")]\n        public string Salutation { get; set; }\n        [FromForm(Name = \"customer[middleName]\")]\n        public string MiddleName { get; set; }\n        [FromForm(Name = \"customer[birthDate]\")]\n        public DateTime? BirthDate { get; set; }\n        [FromForm(Name = \"customer[timeZone]\")]\n        public string TimeZone { get; set; }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/UserRegistrationByInvitation.cs",
    "content": "using System.ComponentModel.DataAnnotations;\nusing Microsoft.AspNetCore.Mvc;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public partial class UserRegistrationByInvitation : UserRegistration\n    {\n        [Required]\n        [FromForm(Name = \"customer[token]\")]\n        public string Token { get; set; }\n        [FromForm(Name = \"customer[organization_id]\")]\n        public string OrganizationId { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/UserSearchResult.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public class UserSearchResult : GenericSearchResult<User>\n    {\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/UserUpdateInfo.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public partial class UserUpdateInfo : Entity\n    {\n        public string FirstName { get; set; }\n        public string LastName { get; set; }\n        public string FullName { get; set; }\n        public string Email { get; set; }\n        public IList<string> Roles { get; set; }\n        public Address DefaultShippingAddress { get; set; }\n        public Address DefaultBillingAddress { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/UsersInvitation.cs",
    "content": "using System.Collections.Generic;\nusing System.ComponentModel.DataAnnotations;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public partial class UsersInvitation : ValueObject\n    {\n        public string Message { get; set; }\n        public IList<string> Roles { get; set; }\n        [Required]\n        public IList<string> Emails { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/ValidateTokenModel.cs",
    "content": "using System.ComponentModel.DataAnnotations;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public partial class ValidateTokenModel\n    {\n        [Required(ErrorMessage = \"A Token is required\")]\n        public string UserId { get; set; }\n\n        [Required(ErrorMessage = \"A Token is required\")]\n        public string Token { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/VerifyCodeViewModel.cs",
    "content": "using System.ComponentModel.DataAnnotations;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public class VerifyCodeViewModel\n    {\n        [Required]\n        public string Provider { get; set; }\n\n        [Required]\n        public string Code { get; set; }\n\n        public string ReturnUrl { get; set; }\n\n        public bool? RememberBrowser { get; set; }\n\n        public bool? RememberMe { get; set; }\n\n        [Required]\n        public string Username { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Security/VerifyPhoneNumberModel.cs",
    "content": "using System.ComponentModel.DataAnnotations;\nusing Microsoft.AspNetCore.Mvc;\n\nnamespace VirtoCommerce.Storefront.Model.Security\n{\n    public class VerifyPhoneNumberModel\n    {\n        [Required]\n        [FromForm(Name = \"customer[code]\")]\n        public string Code { get; set; }\n\n        [Required]\n        [FromForm(Name = \"customer[phoneNumber]\")]\n        public string PhoneNumber { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/SeoInfo.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    /// <summary>\n    /// Represent SEO information and contains common SEO fields  \n    /// </summary>\n    public partial class SeoInfo : ValueObject, IHasLanguage\n    {\n        public string Id { get; set; }\n        public string ObjectType { get; set; }\n        public string ObjectId { get; set; }\n        public bool? IsActive { get; set; }\n        public string MetaDescription { get; set; }\n\n        public string Slug { get; set; }\n\n        public string MetaKeywords { get; set; }\n\n        public string Title { get; set; }\n\n        public string ImageUrl { get; set; }\n\n        #region IHasLanguage Members\n        public Language Language { get; set; }\n        #endregion\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/SeoLinksType.cs",
    "content": "namespace VirtoCommerce.Storefront.Model\n{\n    /// <summary>\n    /// Determines how to generate links for products and categories.\n    /// </summary>\n    public enum SeoLinksType\n    {\n        /// <summary>\n        /// /category/123\n        /// /product/123\n        /// </summary>\n        None,\n        /// <summary>\n        /// /my-cool-category\n        /// /my-cool-product\n        /// </summary>\n        Short,\n        /// <summary>\n        /// /virtual-parent-category/physical-parent-category/my-cool-category\n        /// /virtual-parent-category/physical-parent-category/my-cool-category/my-cool-product\n        /// </summary>\n        Long,\n        /// <summary>\n        /// virtual-parent-category/my-cool-category\n        /// virtual-parent-category/my-cool-category/my-cool-product\n        /// </summary>\n        Collapsed,\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/SettingEntry.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public partial class SettingEntry : IAccessibleByIndexKey\n    {\n        public SettingEntry()\n        {\n            AllowedValues = new List<object>();\n            ArrayValues = new List<object>();\n        }\n        public string Name { get; set; }\n        public object Value { get; set; }\n        public string ValueType { get; set; }\n        public IList<object> AllowedValues { get; set; }\n        public object DefaultValue { get; set; }\n        public bool IsArray { get; set; }\n        public IList<object> ArrayValues { get; set; }\n        public string Title { get; set; }\n        public string Description { get; set; }\n\n        public string IndexKey => Name;\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/SlugInfoRequest.cs",
    "content": "using System.ComponentModel.DataAnnotations;\n\nnamespace VirtoCommerce.Storefront.Model;\n\npublic class SlugInfoRequest\n{\n    public string CultureName { get; set; }\n\n    [Required]\n    public string Slug { get; set; }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/SlugInfoResult.cs",
    "content": "using VirtoCommerce.Storefront.Model.StaticContent;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public class SlugInfoResult\n    {\n        public ContentItem ContentItem { get; set; }\n\n        public SeoInfo EntityInfo { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/SlugRoutingData.cs",
    "content": "namespace VirtoCommerce.Storefront.Model\n{\n    public class SlugRoutingData\n    {\n        public string ObjectType { get; set; }\n        public string ObjectId { get; set; }\n        public object ObjectInstance { get; set; }\n        public string SeoPath { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/SpaThemeContext.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public class SpaThemeContext\n    {\n        public string BaseUrl { get; set; }\n        public string StoreId { get; set; }\n        public string StoreName { get; set; }\n        public Language DefaultLanguage { get; set; }\n        public Language[] AvailLanguages { get; set; }\n        public string CatalogId { get; set; }\n        public Currency DefaultCurrency { get; set; }\n        public Currency[] AvailCurrencies { get; set; }\n        public string UserId { get; set; }\n        public string UserName { get; set; }\n        public IDictionary<string, object> Settings { get; set; }\n\n        public static SpaThemeContext Create(WorkContext workContext, IStorefrontUrlBuilder urlBuilder)\n        {\n            var result = new SpaThemeContext\n            {\n                BaseUrl = urlBuilder.ToAppAbsolute(\"/\"),\n                StoreId = workContext.CurrentStore?.Id,\n                StoreName = workContext.CurrentStore?.Name,\n                DefaultLanguage = workContext.CurrentStore?.DefaultLanguage,\n                AvailLanguages = workContext.CurrentStore?.Languages.ToArray(),\n                CatalogId = workContext.CurrentStore?.Catalog,\n                DefaultCurrency = workContext.AllCurrencies.FirstOrDefault(x => x.Code == workContext.CurrentStore.DefaultCurrencyCode),\n                AvailCurrencies = workContext.AllCurrencies.ToArray(),\n                UserId = workContext.CurrentUser?.Id,\n                UserName = workContext.CurrentUser?.Name,\n                Settings = workContext.Settings\n            };\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/StaticContent/Blog.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.StaticContent\n{\n    public partial class Blog : ContentItem\n    {\n        public Blog()\n        {\n            Permalink = \":folder\";\n        }\n\n        public IMutablePagedList<BlogArticle> Articles { get; set; }\n\n        public override string Handle => Name.Handelize();\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/StaticContent/BlogArticle.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace VirtoCommerce.Storefront.Model.StaticContent\n{\n    public partial class BlogArticle : ContentItem\n    {\n        private static readonly string _excerpToken = \"<!--excerpt-->\";\n\n        public override string Type { get { return \"post\"; } }\n\n        public string Excerpt { get; set; }\n\n        public string BlogName { get; set; }\n\n        public string ImageUrl { get; set; }\n\n        public bool IsSticked { get; set; }\n\n        public bool IsTrending { get; set; }\n\n        public override void LoadContent(string content, IDictionary<string, IEnumerable<string>> metaInfoMap)\n        {\n            var parts = content.Split(new[] { _excerpToken }, StringSplitOptions.None);\n\n            if (parts.Length > 1)\n            {\n                Excerpt = parts[0];\n                content = content.Replace(_excerpToken, string.Empty);\n            }\n\n            if (metaInfoMap.ContainsKey(\"main-image\"))\n            {\n                ImageUrl = metaInfoMap[\"main-image\"].FirstOrDefault();\n            }\n\n            if (metaInfoMap.ContainsKey(\"excerpt\"))\n            {\n                Excerpt = metaInfoMap[\"excerpt\"].FirstOrDefault();\n            }\n\n            if (metaInfoMap.ContainsKey(\"is-sticked\"))\n            {\n\n                bool.TryParse(metaInfoMap[\"is-sticked\"].FirstOrDefault(), out var isSticked);\n\n                IsSticked = isSticked;\n            }\n\n            if (metaInfoMap.ContainsKey(\"is-trending\"))\n            {\n                bool.TryParse(metaInfoMap[\"is-trending\"].FirstOrDefault(), out var isTrending);\n\n                IsTrending = isTrending;\n            }\n\n            base.LoadContent(content, metaInfoMap);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/StaticContent/BlogSearchCriteria.cs",
    "content": "using System.Collections.Generic;\nusing System.Collections.Specialized;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.StaticContent\n{\n    public partial class BlogSearchCriteria : PagedSearchCriteria\n    {\n        public static int DefaultPageSize { get; set; } = 20;\n\n        public BlogSearchCriteria()\n            : this(new Dictionary<string, string>())\n        {\n        }\n\n        public BlogSearchCriteria(IDictionary<string, string> queryString)\n            : base(queryString, DefaultPageSize)\n        {\n        }\n\n        public string Category { get; set; }\n        public string Tag { get; set; }\n        public string Author { get; set; }\n        public string[] ExcludedArticleHandles { get; set; }\n\n        protected virtual void Parse(NameValueCollection queryString)\n        {\n            Category = queryString.Get(\"category\");\n            Tag = queryString.Get(\"tag\");\n            Author = queryString.Get(\"author\");\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/StaticContent/ContentInThemeSearchCriteria.cs",
    "content": "using System;\nusing System.ComponentModel.DataAnnotations;\n\nnamespace VirtoCommerce.Storefront.Model.StaticContent\n{\n    public class ContentInThemeSearchCriteria\n    {\n        public string Permalink { get; set; }\n\n        [Obsolete(\"Use TemplateName instead\")]\n        public string Template\n        {\n            get => TemplateName;\n            set => TemplateName = value;\n        }\n\n        [Required]\n        public string TemplateName { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/StaticContent/ContentItem.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.StaticContent\n{\n    public abstract class ContentItem : IHasLanguage, IAccessibleByIndexKey\n    {\n        protected ContentItem()\n        {\n        }\n\n        public virtual string Type => \"page\";\n\n        public string Author { get; set; }\n\n        public DateTime CreatedDate { get; set; }\n\n        public DateTime? PublishedDate { get; set; }\n\n        public string Title { get; set; }\n\n        /// <summary>\n        /// Relative content url\n        /// </summary>\n        public string Url { get; set; }\n\n        public string Permalink { get; set; }\n\n        /// <summary>\n        /// Represent alternative urls which will be used for redirection to main url\n        /// </summary>\n        public IList<string> Aliases { get; set; } = new List<string>();\n        public IList<string> AliasesUrls { get; set; } = new List<string>();\n\n        public List<string> Tags { get; set; } = new List<string>();\n\n        public List<string> Categories { get; set; } = new List<string>();\n\n        public string Category { get; set; }\n\n        public bool IsPublished { get; set; } = true;\n\n        public DateTime? PublishedAt => PublishedDate ?? CreatedDate;\n\n        /// <summary>\n        /// Content file name without extension\n        /// </summary>\n        public string Name { get; set; }\n\n        /// <summary>\n        /// Relative storage path in storage system (/blogs/page1)\n        /// </summary>\n        public string StoragePath { get; set; }\n\n        public string Content { get; set; }\n\n        /// <summary>\n        /// Liquid layout from store theme used as master page for page rendering. If its null will be used default layout.\n        /// </summary>\n        public string Layout { get; set; }\n\n        public string FileName { get; set; }\n\n        public Language Language { get; set; }\n\n        public int Priority { get; set; }\n\n        public string Description { get; set; }\n\n        /// <summary>\n        /// Limits anonymous access to the page. Set true to block anonymous access. Set false to grant anonymous access.  Default value is false. \n        /// </summary>\n        public bool Authorize { get; set; }\n\n        public virtual string Handle => Url;\n        public IDictionary<string, IEnumerable<string>> MetaInfo { get; set; }\n        public IDictionary<string, IEnumerable<string>> MetaFields => MetaInfo;\n\n        public virtual string IndexKey => Handle;\n\n        public virtual void LoadContent(string content, IDictionary<string, IEnumerable<string>> metaInfoMap)\n        {\n            if (metaInfoMap != null)\n            {\n                foreach (var setting in metaInfoMap)\n                {\n                    var settingValue = setting.Value.FirstOrDefault();\n                    switch (setting.Key.ToLower())\n                    {\n                        case \"permalink\":\n                            Permalink = settingValue;\n                            break;\n\n                        case \"aliases\":\n                            Aliases = setting.Value.ToList();\n                            break;\n\n                        case \"title\":\n                            Title = settingValue;\n                            break;\n\n                        case \"author\":\n                            Author = settingValue;\n                            break;\n\n                        case \"published\":\n                            bool isPublished;\n                            IsPublished = !bool.TryParse(settingValue, out isPublished) || isPublished;\n                            break;\n\n                        case \"date\":\n                            DateTime date;\n                            PublishedDate = CreatedDate = DateTime.TryParse(settingValue, out date) ? date : new DateTime();\n                            break;\n                        case \"tags\":\n                            Tags = setting.Value.OrderBy(t => t).Select(t => t.Handelize()).ToList();\n                            break;\n\n                        case \"categories\":\n                            Categories = setting.Value?.Select(x => x.Handelize()).ToList();\n                            break;\n\n                        case \"category\":\n                            Category = settingValue?.Handelize();\n                            break;\n\n                        case \"layout\":\n                            Layout = settingValue;\n                            break;\n\n                        case \"priority\":\n                            int priority;\n                            Priority = int.TryParse(settingValue, out priority) ? priority : 0;\n                            break;\n\n                        case \"description\":\n                            Description = settingValue;\n                            break;\n\n                        case \"authorize\":\n                            bool isAuthorize;\n                            if (bool.TryParse(settingValue, out isAuthorize))\n                            {\n                                Authorize = isAuthorize;\n                            }\n                            break;\n                    }\n                }\n            }\n\n            MetaInfo = metaInfoMap;\n            Content = content;\n            if (Title == null)\n            {\n                Title = Name;\n            }\n        }\n\n        public override string ToString()\n        {\n            return Url ?? Name;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/StaticContent/ContentPage.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\n\nnamespace VirtoCommerce.Storefront.Model.StaticContent\n{\n    public partial class ContentPage : ContentItem\n    {\n        public string Template { get; set; }\n\n        public override void LoadContent(string content, IDictionary<string, IEnumerable<string>> metaInfoMap)\n        {\n            Template = \"page\";\n\n            if (metaInfoMap.ContainsKey(\"template\"))\n            {\n                Template = metaInfoMap[\"template\"].FirstOrDefault();\n            }\n\n            base.LoadContent(content, metaInfoMap);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/StaticContent/IContentBlobProvider.cs",
    "content": "using System.Collections.Generic;\nusing System.IO;\nusing Microsoft.Extensions.Primitives;\n\nnamespace VirtoCommerce.Storefront.Model.StaticContent\n{\n    /// <summary>\n    /// This abstraction represent facade to access theme blob resources\n    /// </summary>\n    public interface IContentBlobProvider\n    {\n        /// <summary>\n        /// Check a given path exist.\n        /// </summary>\n        /// <param name=\"path\">Relative or absolute path that identifies the file or folder.</param>\n        /// <returns>The flag is path exist.</returns>\n        bool PathExists(string path);\n        /// <summary>\n        /// Opens the given path for reading\n        /// </summary>\n        /// <param name=\"path\">Relative or absolute path that identifies the file or folder.</param>\n        /// <returns>stream</returns>\n        Stream OpenRead(string path);\n        /// <summary>\n        /// Opens the given path for writing\n        /// </summary>\n        /// <param name=\"path\">Relative or absolute path that identifies the file or folder.</param>\n        /// <returns>stream</returns>\n        Stream OpenWrite(string path);\n\n        /// <summary>\n        /// Search in given by <paramref name=\"path\"/> location all occurrences with <paramref name=\"searchPattern\"/>\n        /// </summary>\n        /// <param name=\"path\">Relative or absolute path that identifies the file or folder.</param>\n        /// <param name=\"searchPattern\">Match pattern</param>\n        /// <param name=\"recursive\">Flag for recursive search</param>\n        /// <returns>Paths for found files or folders</returns>\n        IEnumerable<string> Search(string path, string searchPattern, bool recursive);\n\n        /// <summary>\n        /// Creates a <see cref=\"IChangeToken\"/> for the specified <paramref name=\"path\"/>.\n        /// </summary>\n        /// <param name=\"path\">Path string used to determine what files or folders to monitor. Example: **/*.cs, *.*, subFolder/**/*.cshtml.</param>\n        /// <returns>An <see cref=\"IChangeToken\"/> that is notified when a file matching <paramref name=\"path\"/> is added, modified or deleted.</returns>\n        IChangeToken Watch(string path);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/StaticContent/IStaticContentItemFactory.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.StaticContent\n{\n    public interface IStaticContentItemFactory\n    {\n        ContentItem GetItemFromPath(string path);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/StaticContent/IStaticContentLoader.cs",
    "content": "using System.Collections.Generic;\n\nnamespace VirtoCommerce.Storefront.Model.StaticContent\n{\n    public interface IStaticContentLoader\n    {\n        void ReadMetaData(string content, IDictionary<string, IEnumerable<string>> metadata);\n        string PrepareContent(string content);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/StaticContent/IStaticContentLoaderFactory.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.StaticContent\n{\n    public interface IStaticContentLoaderFactory\n    {\n        IStaticContentLoader CreateLoader(ContentItem contentItem);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/StaticContent/IStaticContentService.cs",
    "content": "using System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Model.StaticContent\n{\n    /// <summary>\n    /// Represent a search and rendering static content pages (pages and blogs etc)\n    /// </summary>\n    public interface IStaticContentService\n    {\n        IEnumerable<ContentItem> LoadStoreStaticContent(Store store, string type, bool force = false);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/StaticContent/StaticContentSearchCriteria.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.StaticContent\n{\n    public partial class StaticContentSearchCriteria\n    {\n        public string Keyword { get; set; }\n\n        public string Layout { get; set; }\n\n        public string SearchIn { get; set; }\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/StorefrontNotification.cs",
    "content": "namespace VirtoCommerce.Storefront.Model\n{\n    public partial class StorefrontNotification\n    {\n        public string Title { get; set; }\n\n        public string Message { get; set; }\n\n        public StorefrontNotificationType Type { get; set; }\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/StorefrontNotificationType.cs",
    "content": "namespace VirtoCommerce.Storefront.Model\n{\n    public enum StorefrontNotificationType\n    {\n        Success,\n        Info,\n        Warning,\n        Error\n    }\n}"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Stores/IStoreService.cs",
    "content": "using System.Threading.Tasks;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.Stores\n{\n    public interface IStoreService\n    {\n        Task<Store[]> GetAllStoresAsync();\n        Task<Store> GetStoreByIdAsync(string id, Currency currency = null);\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Stores/Store.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model.Stores\n{\n    /// <summary>\n    /// Represent store - main ecommerce aggregate unit\n    /// </summary>\n    public partial class Store : Entity, IHasSettings\n    {\n        const string FILE_SCHEME = \"file\";\n\n        public Store()\n        {\n            Languages = new List<Language>();\n            CurrenciesCodes = new List<string>();\n            SeoInfos = new List<SeoInfo>();\n            AvailFulfillmentCenterIds = new List<string>();\n            TrustedGroups = new List<string>();\n        }\n\n        public string Name { get; set; }\n\n        public string Description { get; set; }\n\n        /// <summary>\n        /// Url of store storefront\n        /// </summary>\n        public string Url { get; set; }\n\n        /// <summary>\n        /// Secure url of store, must use https protocol, required\n        /// </summary>\n        public string SecureUrl { get; set; }\n\n        public string Host\n        {\n            get\n            {\n                string result = null;\n                if (!string.IsNullOrEmpty(Url) && (Uri.TryCreate(Url, UriKind.Absolute, out var url) && url.Scheme != FILE_SCHEME))\n                {\n                    result = url.Host;\n                }\n                return result;\n            }\n        }\n\n        /// <summary>\n        /// State of store (open, closing, maintenance)\n        /// </summary>\n        public StoreStatus StoreState { get; set; }\n\n        public string TimeZone { get; set; }\n\n        public string Country { get; set; }\n\n        public string Region { get; set; }\n\n        public string Status => StoreState.ToString();\n        /// <summary>\n        /// Default Language culture name  of store ( example en-US )\n        /// </summary>\n        public Language DefaultLanguage { get; set; }\n        /// <summary>\n        /// All supported languages\n        /// </summary>\n        public IList<Language> Languages { get; set; }\n\n        /// <summary>\n        /// Default currency of store. \n        /// Achtung ! Do not use Currency objects here, because Store object can be cached but Currency may be changed depend on request culture.\n        /// </summary>\n        public string DefaultCurrencyCode { get; set; }\n        /// <summary>\n        /// List of all supported currencies codes\n        /// </summary>\n        public IList<string> CurrenciesCodes { get; set; }\n\n        /// <summary>\n        /// Product catalog id assigned to store\n        /// </summary>\n        public string Catalog { get; set; }\n\n        /// <summary>\n        /// Contact email of store\n        /// </summary>\n        public string Email { get; set; }\n\n        /// <summary>\n        /// Administrator contact email of store\n        /// </summary>\n        public string AdminEmail { get; set; }\n\n        /// <summary>\n        /// Store theme name\n        /// </summary>\n        public string ThemeName { get; set; }\n\n        /// <summary>\n        /// All store seo informations for all languages\n        /// </summary>\n        public IList<SeoInfo> SeoInfos { get; set; }\n\n        /// <summary>\n        /// All linked stores (their accounts can be reused here)\n        /// </summary>\n        public IList<string> TrustedGroups { get; set; }\n\n        /// <summary>\n        /// Main (default)  fulfillment center\n        /// </summary>\n        public string DefaultFulfillmentCenterId { get; set; }\n\n        /// <summary>\n        /// Additional fulfillment centers\n        /// </summary>\n        public IList<string> AvailFulfillmentCenterIds { get; set; }\n\n        public bool QuotesEnabled { get; set; }\n\n        public bool SubscriptionEnabled { get; set; }\n\n        public bool TaxCalculationEnabled { get; set; }\n\n        /// <summary>\n        /// This flag restricts anonymous store access\n        /// </summary>\n        public bool AnonymousUsersAllowed { get; set; }\n\n        /// <summary>\n        /// This flag enables the SPA fallback routing for a store\n        /// </summary>\n        public bool IsSpa { get; set; }\n\n        public bool EmailVerificationEnabled { get; set; }\n\n        public bool CreateAnonymousOrderEnabled { get; set; }\n\n        public decimal FixedTaxRate { get; set; }\n\n        public string CartValidationRuleSet { get; set; }\n\n\n        public IMutablePagedList<DynamicProperty> DynamicProperties { get; set; }\n\n        #region IHasSettings Members\n\n        public IMutablePagedList<SettingEntry> Settings { get; set; }\n\n        #endregion\n\n        public SeoLinksType SeoLinksType { get; set; }\n\n        /// <summary>\n        /// Checks if specified URL starts with store URL or store secure URL.\n        /// </summary>\n        /// <param name=\"url\"></param>\n        /// <returns></returns>\n        public bool IsStoreUrl(Uri url)\n        {\n            var result = false;\n\n            var requestAddress = url.ToString();\n\n            if (!string.IsNullOrEmpty(Url))\n            {\n                result = requestAddress.StartsWith(Url, StringComparison.InvariantCultureIgnoreCase);\n            }\n\n            if (!result && !string.IsNullOrEmpty(SecureUrl))\n            {\n                result = requestAddress.StartsWith(SecureUrl, StringComparison.InvariantCultureIgnoreCase);\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Stores/StoreStatus.cs",
    "content": "namespace VirtoCommerce.Storefront.Model.Stores\n{\n    public enum StoreStatus\n    {\n        Open,\n        Closed,\n        RestrictedAccess\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/SwaggerCustomSchemaIdAttribute.cs",
    "content": "using System;\n\nnamespace VirtoCommerce.Storefront.Infrastructure.Swagger\n{\n\n    [AttributeUsage(AttributeTargets.Class, Inherited = false)]\n    public class SwaggerSchemaIdAttribute : Attribute\n    {\n        public string Id { get; private set; }\n\n        public SwaggerSchemaIdAttribute(string id)\n        {\n            Id = id;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/Term.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public partial class Term : ValueObject\n    {\n        public string Name { get; set; }\n        public string Value { get; set; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/TermExtensions.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    public static class TermExtensions\n    {\n\n        public static IEnumerable<Term> ToTerms(this string input)\n        {\n            if (input == null)\n            {\n                throw new ArgumentNullException(nameof(input));\n            }\n            var result = input.Split(';')\n                      .Select(x => x.Split(':'))\n                      .Where(x => x.Length == 2)\n                      .SelectMany(x => x[1].Split(',').Select(v => new Term { Name = x[0], Value = v }));\n            return result;\n        }\n        /// <summary>\n        /// Groups terms by name and converts each group to a string:\n        /// name1:value1,value2,value3\n        /// </summary>\n        /// <param name=\"terms\"></param>\n        /// <returns></returns>\n        public static List<string> ToStrings(this IEnumerable<Term> terms)\n        {\n            List<string> result = null;\n\n            const string commaEscapeString = \"%x2C\";\n            if (terms != null)\n            {\n                var strings = terms\n                    .GroupBy(t => t.Name, t => t, StringComparer.OrdinalIgnoreCase)\n                    .OrderBy(g => g.Key)\n                    .Select(\n                        g =>\n                            string.Join(\":\", g.Key,\n                                string.Join(\",\",\n                                    g.Select(t => t.Value?.Replace(\",\", commaEscapeString))\n                                        .Distinct(StringComparer.OrdinalIgnoreCase)\n                                        .OrderBy(v => v))))\n                    .ToList();\n\n                if (strings.Any())\n                {\n                    result = strings;\n                }\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/VirtoCommerce.Storefront.Model.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\n  <PropertyGroup>\n    <TargetFramework>net8.0</TargetFramework>\n    <!--Need to include TargetLatestRuntimePatch, otherwise get following error about ASP NET Core restored version-->\n    <!--https://stackoverflow.com/questions/51642172/the-project-was-restored-using-microsoft-netcore-app-version-2-1-0-but-with-cur-->\n    <!--https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-patch-selection-->\n    <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>\n    <Description>The storefront implementation of the Virto Commerce platform.</Description>\n    <PackageLicenseUrl>https://virtocommerce.com/open-source-license</PackageLicenseUrl>\n    <PackageProjectUrl>https://github.com/VirtoCommerce/vc-storefront-core</PackageProjectUrl>\n    <PackageIconUrl>https://virtocommerce.com/themes/assets/logo.jpg</PackageIconUrl>\n    <RepositoryUrl>https://github.com/VirtoCommerce/vc-storefront-core</RepositoryUrl>\n    <IsPackable>False</IsPackable>\n    <OutputType>Library</OutputType>\n  </PropertyGroup>\n  <ItemGroup>\n    <FrameworkReference Include=\"Microsoft.AspNetCore.App\" />\n    <PackageReference Include=\"Microsoft.AspNetCore.Mvc.NewtonsoftJson\" Version=\"8.0.0\" />\n    <PackageReference Include=\"Nito.AsyncEx\" Version=\"5.1.2\" />\n    <PackageReference Include=\"FluentValidation\" Version=\"11.8.1\" />\n    <PackageReference Include=\"PagedList.Core\" Version=\"1.17.4\" />\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "VirtoCommerce.Storefront.Model/WorkContext.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing Newtonsoft.Json;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Security;\nusing VirtoCommerce.Storefront.Model.StaticContent;\nusing VirtoCommerce.Storefront.Model.Stores;\n\nnamespace VirtoCommerce.Storefront.Model\n{\n    /// <summary>\n    /// Main working context contains all data which could be used in presentation logic\n    /// </summary>\n    public class WorkContext : IDisposable, ICloneable\n    {\n        public WorkContext()\n        {\n            ExternalLoginProviders = new List<LoginProvider>();\n            ApplicationSettings = new Dictionary<string, object>();\n            Form = new Form();\n        }\n\n        public SlugRoutingData SlugRoutingData { get; set; }\n\n        public string Template { get; set; }\n\n        /// <summary>\n        /// Merchants can specify a page_description.\n        /// </summary>\n        public string PageDescription => CurrentPageSeo?.MetaDescription ?? string.Empty;\n\n        /// <summary>\n        /// Merchants can specify a page_keywords.\n        /// </summary>\n        public string PageKeywords => CurrentPageSeo?.MetaKeywords ?? string.Empty;\n\n        /// <summary>\n        /// The liquid object page_title returns the title of the current page.\n        /// </summary>\n        public string PageTitle => CurrentPageSeo?.Title ?? string.Empty;\n        public string PageImageUrl => CurrentPageSeo?.ImageUrl ?? string.Empty;\n        public string CanonicalUrl => CurrentPageSeo?.Slug ?? string.Empty;\n\n        /// <summary>\n        /// Layout which will be used for rendering current view\n        /// </summary>\n        public string Layout { get; set; }\n        /// <summary>\n        /// Current request url example: http:/host/app/store/en-us/search?page=2\n        /// </summary>\n        public Uri RequestUrl { get; set; }\n\n        public IDictionary<string, string> QueryString { get; set; }\n\n        public IMutablePagedList<Country> Countries { get; set; }\n\n        //Contains  the collections of breadcrumbs are relevant to  the current request\n        public IMutablePagedList<Breadcrumb> Breadcrumbs { get; set; }\n        /// <summary>\n        /// Current user\n        /// </summary>\n        public User CurrentUser { get; set; }\n        public User Customer => CurrentUser;\n\n        /// <summary>\n        /// Current language and culture\n        /// </summary>\n        public Language CurrentLanguage { get; set; }\n\n        /// <summary>\n        /// Current currency\n        /// </summary>\n        public Currency CurrentCurrency { get; set; }\n\n        public SeoInfo CurrentPageSeo { get; set; }\n\n        /// <summary>\n        /// Current store\n        /// </summary>\n        public Store CurrentStore { get; set; }\n        public Store Shop => CurrentStore;\n\n\n        /// <summary>\n        /// Current single form aggregates ModelState errors\n        /// </summary>\n        public Form Form { get; set; }\n\n        /// <summary>\n        /// Gets or sets the collection of site navigation menu link lists\n        /// </summary>\n        public IMutablePagedList<MenuLinkList> CurrentLinkLists { get; set; }\n        [JsonIgnore]\n        public IMutablePagedList<MenuLinkList> Linklists => CurrentLinkLists;\n\n        /// <summary>\n        /// List of all supported stores\n        /// </summary>\n        public IList<Store> AllStores { get; set; }\n\n        /// <summary>\n        /// List of all active system currencies\n        /// </summary>\n        public IList<Currency> AllCurrencies { get; set; }\n\n        /// <summary>\n        /// List of all available roles\n        /// </summary>\n        public IEnumerable<Role> AvailableRoles { get; set; }\n\n        /// <summary>\n        /// List of all b2b roles\n        /// </summary>\n        public IEnumerable<Role> BusinessToBusinessRoles { get; set; }\n\n        public string ErrorMessage { get; set; }\n\n\n        #region Static Content Properties\n        public ContentPage CurrentPage { get; set; }\n        public ContentPage Page => CurrentPage;\n\n        public StaticContentSearchCriteria CurrentStaticSearchCriteria { get; set; }\n\n        public IMutablePagedList<ContentItem> StaticContentSearchResult { get; set; }\n\n        public BlogSearchCriteria CurrentBlogSearchCritera { get; set; }\n\n        public Blog CurrentBlog { get; set; }\n        public Blog Blog => CurrentBlog;\n\n\n        public BlogArticle CurrentBlogArticle { get; set; }\n        public BlogArticle Article => CurrentBlogArticle;\n        #endregion\n\n        private DateTime? _utcNow;\n        /// <summary>\n        /// Represent current storefront datetime in UTC (may be changes to test in future or past events)\n        /// </summary>\n        public DateTime StorefrontUtcNow\n        {\n            get\n            {\n                return _utcNow ?? DateTime.UtcNow;\n            }\n            set\n            {\n                _utcNow = value;\n            }\n        }\n\n        public IList<Country> AllCountries { get; set; }\n\n        public StorefrontNotification StorefrontNotification { get; set; }\n        public StorefrontNotification Notification => StorefrontNotification;\n\n        /// <summary>\n        /// All static content items (Pages, blog articles etc) for current store and theme\n        /// </summary>\n        public IMutablePagedList<ContentItem> Pages { get; set; }\n\n        /// <summary>\n        /// All static templates items (catalog, cart etc) for current store and theme\n        /// </summary>\n        public IMutablePagedList<ContentItem> Templates { get; set; }\n\n        /// <summary>\n        ///  All blogs with articles for current store and theme\n        /// </summary>\n        public IMutablePagedList<Blog> Blogs { get; set; }\n\n        /// <summary>\n        /// Gets or sets the collection of external login providers\n        /// </summary>\n        public IList<LoginProvider> ExternalLoginProviders { get; set; }\n\n\n        /// <summary>\n        /// Gets or sets the dictionary of application settings\n        /// </summary>\n        public IDictionary<string, object> ApplicationSettings { get; set; }\n\n        /// <summary>\n        /// Current page number\n        /// </summary>\n        public int PageNumber { get; set; } = 1;\n        /// <summary>\n        /// Current page size\n        /// </summary>\n        public int PageSize { get; set; } = 20;\n\n        public int SkipCount\n        {\n            get\n            {\n                return (PageNumber - 1) * PageSize;\n            }\n        }\n        /// <summary>\n        /// Settings defined in theme\n        /// </summary>\n        public IDictionary<string, object> Settings { get; set; }\n\n        public string Version { get; set; }\n\n        #region GDPR consent\n        public bool CanTrack { get; set; }\n        public string ConsentCookie { get; set; }\n        #endregion\n\n        /// <summary>\n        /// Checks if the current hosting environment name is Microsoft.AspNetCore.Hosting.EnvironmentName.Development.\n        /// </summary>\n        public bool IsDevelopment { get; set; }\n\n        /// <summary>\n        /// The flag that indicates that themes resources won't use cache to be able to preview changes frequently during development and designing.\n        /// This setting will be helpful especially when the AzureBlobStorage provider is used because of unable to monitor blob changes as well as for file system\n        /// </summary>\n        public bool IsPreviewMode { get; set; }\n\n\n        #region IDisposable Implementation\n\n        public void Dispose()\n        {\n            Dispose(true);\n            GC.SuppressFinalize(this);\n        }\n\n        protected virtual void Dispose(bool disposing)\n        {\n            if (disposing)\n            {\n                // cleanup\n            }\n        }\n\n        public object Clone()\n        {\n            var result = MemberwiseClone() as WorkContext;\n            return result;\n        }\n\n        #endregion\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Features/CustomServiceCollection.cs",
    "content": "namespace VirtoCommerce.Storefront.Tests.Features\n{\n    using Microsoft.Extensions.DependencyInjection;\n\n    using VirtoCommerce.Storefront.Model.Features;\n\n    public class CustomServiceCollection : ServiceCollection\n    {\n        public CustomServiceCollection()\n        {\n            this.AddSingleton<IFeaturesAgent, FeaturesAgent>();\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Features/FeaturesAgentTests.cs",
    "content": "namespace VirtoCommerce.Storefront.Tests.Features\n{\n    using System;\n    using System.IO;\n\n    using Microsoft.Extensions.DependencyInjection;\n\n    using Newtonsoft.Json.Linq;\n\n    using VirtoCommerce.Storefront.Model.Features;\n\n    using Xunit;\n\n    public class FeaturesAgentTests\n    {\n        [Theory]\n        [InlineData(\"OrdersBrowsing\", true)]\n        [InlineData(\"InvoiceBrowsing\", true)]\n        [InlineData(\"PaymentBrowsing\", true)]\n        [InlineData(\"ManageUsers\", true)]\n        [InlineData(\"ManageRoles\", true)]\n        [InlineData(\"ContractsInfoBrowsing\", true)]\n        [InlineData(\"RetrieveReordering\", false)]\n        [InlineData(\"OrderApproval\", false)]\n        [InlineData(\"ProductTextSearch\", true)]\n        [InlineData(\"ProductsFiltering\", true)]\n        [InlineData(\"ProductDetailsBrowsing\", true)]\n        [InlineData(\"ProductPriceBrowsing\", true)]\n        [InlineData(\"ProductRecommendation\", true)]\n        [InlineData(\"OrderDraft\", true)]\n        [InlineData(\"WishList\", true)]\n        [InlineData(\"SubmitOrder\", false)]\n        [InlineData(\"ProductInventoryBrowsing\", false)]\n        [InlineData(\"ManageShipmentDetails\", false)]\n        [InlineData(\"ManagePaymentDetails\", false)]\n        public void IsActive_FeatureStatus_ShouldBeExpected(string featureName, bool expectedResult)\n        {\n            // arrange\n            var services = new CustomServiceCollection();\n            var settingsJObject = ReadSettingsFile(\"full_data.json\");\n\n            using var serviceProvider = services.BuildServiceProvider();\n            // act\n            var featuresAgent = serviceProvider.GetService<IFeaturesAgent>();\n            var result = featuresAgent.IsActive(featureName, settingsJObject);\n\n            // assert\n            Assert.Equal(expectedResult, result);\n        }\n\n        [Theory]\n        [InlineData(\"RetrieveReordering\", true)]\n        [InlineData(\"OrderApproval\", true)]\n        public void IsActive_FeatureWithoutReplaces_ShouldBeActive(string featureName, bool expectedResult)\n        {\n            // arrange\n            var services = new CustomServiceCollection();\n\n            // in this sample were removed services from 'replaces' sections\n            var settingsJObject = ReadSettingsFile(\"full_data_without_replaces.json\");\n\n            using var serviceProvider = services.BuildServiceProvider();\n            // act\n            var featuresAgent = serviceProvider.GetService<IFeaturesAgent>();\n            var result = featuresAgent.IsActive(featureName, settingsJObject);\n\n            // assert\n            Assert.Equal(expectedResult, result);\n        }\n\n        [Theory]\n        [InlineData(\"RetrieveReordering\", false)]\n        [InlineData(\"OrderApproval\", false)]\n        public void IsActive_FeatureWithConflicts_ShouldBeInactive(string featureName, bool expectedResult)\n        {\n            // arrange\n            var services = new CustomServiceCollection();\n\n            // in this sample were removed services from 'replaces' sections\n            var settingsJObject = ReadSettingsFile(\"full_data_with_conflicts.json\");\n\n            using var serviceProvider = services.BuildServiceProvider();\n            // act\n            var featuresAgent = serviceProvider.GetService<IFeaturesAgent>();\n            var result = featuresAgent.IsActive(featureName, settingsJObject);\n\n            // assert\n            Assert.Equal(expectedResult, result);\n        }\n\n        [Fact]\n        public void IsActive_OrdersBrowsing_ShouldBeInactive()\n        {\n            // arrange\n            var services = new CustomServiceCollection();\n\n            // in this sample were removed services from 'replaces' sections\n            var settingsJObject = ReadSettingsFile(\"full_data_with_disabled_feature.json\");\n\n            using var serviceProvider = services.BuildServiceProvider();\n            // act\n            var featuresAgent = serviceProvider.GetService<IFeaturesAgent>();\n            var result = featuresAgent.IsActive(\"OrdersBrowsing\", settingsJObject);\n\n            // assert\n            Assert.False(result);\n        }\n\n        private static JObject ReadSettingsFile(string defaultFileName = \"test_data.json\")\n        {\n            var currentDirectory = Environment.CurrentDirectory;\n            var path = Path.Combine(currentDirectory, \"Features\", \"Samples\", defaultFileName);\n            var fileInfo = new FileInfo(path);\n\n            try\n            {\n                var text = File.ReadAllText(fileInfo.FullName);\n                return JObject.Parse(text);\n            }\n            catch (Exception e)\n            {\n                Console.WriteLine(e);\n                throw;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Features/Samples/empty_data.json",
    "content": "{\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Features/Samples/empty_file.json",
    "content": ""
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Features/Samples/full_data.json",
    "content": "{\n  \"features\": [\n    {\n      \"Name\": \"OrdersBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"PaymentBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"InvoiceBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ManageUsers\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ManageRoles\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ContractsInfoBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"RetrieveReordering\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": [ \"SubmitOrder\", \"ProductInventoryBrowsing\", \"ManageShipmentDetails\", \"ManagePaymentDetails\" ]\n    },\n    {\n      \"Name\": \"OrderApproval\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": [ \"SubmitOrder\", \"ProductInventoryBrowsing\", \"ManageShipmentDetails\", \"ManagePaymentDetails\" ]\n    },\n    {\n      \"Name\": \"ProductTextSearch\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ProductsFiltering\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ProductDetailsBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ProductPriceBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ProductRecommendation\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"OrderDraft\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\" ],\n      \"Replaces\": [ \"RetrieveReordering\", \"OrderApproval\" ],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"WishList\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"SubmitOrder\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\", \"OrderDraft\", \"ProductInventoryBrowsing\" ],\n      \"Replaces\": [ \"RetrieveReordering\", \"OrderApproval\" ],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ProductInventoryBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\", \"OrderDraft\", \"SubmitOrder\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ManageShipmentDetails\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\", \"OrderDraft\", \"SubmitOrder\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ManagePaymentDetails\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\", \"OrderDraft\", \"SubmitOrder\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    }\n  ]\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Features/Samples/full_data_with_conflicts.json",
    "content": "{\n  \"features\": [\n    {\n      \"Name\": \"OrdersBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"PaymentBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"InvoiceBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ManageUsers\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ManageRoles\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ContractsInfoBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": [ \"RetrieveReordering\" ]\n    },\n    {\n      \"Name\": \"RetrieveReordering\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": [ \"SubmitOrder\", \"ProductInventoryBrowsing\", \"ManageShipmentDetails\", \"ManagePaymentDetails\" ]\n    },\n    {\n      \"Name\": \"OrderApproval\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": [ \"SubmitOrder\", \"ProductInventoryBrowsing\", \"ManageShipmentDetails\", \"ManagePaymentDetails\" ]\n    },\n    {\n      \"Name\": \"ProductTextSearch\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\" ],\n      \"Replaces\": [],\n      \"Conflicts\": [ \"OrderApproval\" ]\n    },\n    {\n      \"Name\": \"ProductsFiltering\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ProductDetailsBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ProductPriceBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ProductRecommendation\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"OrderDraft\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"WishList\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"SubmitOrder\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\", \"OrderDraft\", \"ProductInventoryBrowsing\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ProductInventoryBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\", \"OrderDraft\", \"SubmitOrder\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ManageShipmentDetails\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\", \"OrderDraft\", \"SubmitOrder\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ManagePaymentDetails\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\", \"OrderDraft\", \"SubmitOrder\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    }\n  ]\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Features/Samples/full_data_with_disabled_feature.json",
    "content": "{\n  \"features\": [\n    {\n      \"Name\": \"OrdersBrowsing\",\n      \"IsActive\": false,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    }\n  ]\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Features/Samples/full_data_without_replaces.json",
    "content": "{\n  \"features\": [\n    {\n      \"Name\": \"OrdersBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"PaymentBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"InvoiceBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ManageUsers\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ManageRoles\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ContractsInfoBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"RetrieveReordering\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": [ \"SubmitOrder\", \"ProductInventoryBrowsing\", \"ManageShipmentDetails\", \"ManagePaymentDetails\" ]\n    },\n    {\n      \"Name\": \"OrderApproval\",\n      \"IsActive\": true,\n      \"Requires\": [],\n      \"Replaces\": [],\n      \"Conflicts\": [ \"SubmitOrder\", \"ProductInventoryBrowsing\", \"ManageShipmentDetails\", \"ManagePaymentDetails\" ]\n    },\n    {\n      \"Name\": \"ProductTextSearch\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ProductsFiltering\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ProductDetailsBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ProductPriceBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ProductRecommendation\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"OrderDraft\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"WishList\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"SubmitOrder\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\", \"OrderDraft\", \"ProductInventoryBrowsing\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ProductInventoryBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\", \"OrderDraft\", \"SubmitOrder\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ManageShipmentDetails\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\", \"OrderDraft\", \"SubmitOrder\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    },\n    {\n      \"Name\": \"ManagePaymentDetails\",\n      \"IsActive\": true,\n      \"Requires\": [ \"ProductTextSearch\", \"ProductsFiltering\", \"ProductDetailsBrowsing\", \"ProductPriceBrowsing\", \"OrderDraft\", \"SubmitOrder\" ],\n      \"Replaces\": [],\n      \"Conflicts\": []\n    }\n  ]\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Features/Samples/test_data.json",
    "content": "{\n  \"features\": [\n    {\n      \"Name\": \"OrdersBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [ \"PaymentBrowsing\", \"InvoiceBrowsing\" ],\n      \"Replaces\": []\n    },\n    {\n      \"Name\": \"PaymentBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [ \"OrdersBrowsing\", \"InvoiceBrowsing\" ],\n      \"Replaces\": []\n    },\n    {\n      \"Name\": \"InvoiceBrowsing\",\n      \"IsActive\": true,\n      \"Requires\": [ \"OrdersBrowsing\", \"PaymentBrowsing\" ],\n      \"Replaces\": []\n    }\n  ]\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/JsonConverterTests.cs",
    "content": "using Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\nusing Newtonsoft.Json.Serialization;\nusing VirtoCommerce.Storefront.Model.Security;\nusing Xunit;\n\nnamespace VirtoCommerce.Storefront.Tests\n{\n    public class JsonConverterTests\n    {\n        [Fact]\n        public void SerializeUser()\n        {\n            var user = new User\n            {\n\n            };\n            var settings = new JsonSerializerSettings()\n            {\n                DefaultValueHandling = DefaultValueHandling.Include,\n                NullValueHandling = NullValueHandling.Include,\n                ReferenceLoopHandling = ReferenceLoopHandling.Ignore,\n                ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor,\n                ContractResolver = new CamelCasePropertyNamesContractResolver()\n            };\n            var serializer = JsonSerializer.Create(settings);\n            var result = JObject.FromObject(user, serializer);\n            Assert.NotNull(result);\n        }\n\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/LiquidThemeEngine/ShopifyLiquidThemeEngineTests.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.Extensions.Caching.Memory;\nusing Microsoft.Extensions.Options;\nusing Microsoft.Extensions.Primitives;\nusing Moq;\nusing Newtonsoft.Json.Linq;\nusing VirtoCommerce.LiquidThemeEngine;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Caching;\nusing VirtoCommerce.Storefront.Model.Features;\nusing VirtoCommerce.Storefront.Model.StaticContent;\nusing VirtoCommerce.Storefront.Model.Stores;\nusing Xunit;\n\nnamespace VirtoCommerce.Storefront.Tests.LiquidThemeEngine\n{\n    public sealed class ShopifyLiquidThemeEngineTests : IDisposable\n    {\n        private enum DefaultThemeType\n        {\n            WithoutPresets,\n            WithPresets,\n            WithPresetsAndCurrentObject\n        }\n\n        private static readonly string ThemesPath = \"Themes\";\n        private static readonly string BaseThemePath = $\"odt{Path.DirectorySeparatorChar}default\";\n        private static readonly string CurrentThemePath = $\"odt{Path.DirectorySeparatorChar}current\";\n        private static readonly string SettingsPath = $\"config{Path.DirectorySeparatorChar}settings_data.json\";\n\n        private static JObject DefaultSettingsWithoutPresets => JObject.Parse(@\"\n        {\n            'background_color': '#fff',\n            'foreground_color': '#000'\n        }\n        \");\n\n        private static JObject DefaultSettingsWithPresets => JObject.Parse(@\"\n        {\n            'current': 'Light',\n            'presets': {\n                'Dark': {\n                    'background_color': '#000',\n                    'foreground_color': '#fff'\n                },\n                'Light': {\n                    'background_color': '#fff',\n                    'foreground_color': '#000'\n                }\n            }\n        }\n        \");\n\n        private static JObject DefaultSettingsWithPresetsAndCurrentObject => JObject.Parse(@\"\n        {\n            'current': {\n                'background_color': '#fff',\n                'foreground_color': '#000'\n            },\n            'presets': {\n                'Dark': {\n                    'background_color': '#000',\n                    'foreground_color': '#fff'\n                },\n                'Light': {\n                    'background_color': '#fff',\n                    'foreground_color': '#000'\n                }\n            }\n        }\n        \");\n\n        private static JObject CurrentSettingsWithoutSelectedPreset => JObject.Parse(@\"\n        {\n            'foreground_color': '#333'\n        }\n        \");\n\n        private static JObject CurrentSettingsWithSelectedPreset => JObject.Parse(@\"\n        {\n            'current': 'Dark',\n            'foreground_color': '#333'\n        }\n        \");\n\n        private readonly StreamWriter _defaultThemeStreamWriter = new StreamWriter(new MemoryStream()) { AutoFlush = true };\n        private readonly StreamWriter _currentThemeStreamWriter = new StreamWriter(new MemoryStream()) { AutoFlush = true };\n\n        private Stream DefaultThemeStream { get; set; }\n        private Stream CurrentThemeStream { get; set; }\n\n        [Fact]\n        public void Settings_Without_Inheritance_Flat()\n        {\n            InitializeStreams(DefaultThemeType.WithoutPresets, false);\n            Check_Without_Inheritance();\n        }\n\n        [Fact]\n        public void Settings_Without_Inheritance_Presets()\n        {\n            InitializeStreams(DefaultThemeType.WithPresets, false);\n            Check_Without_Inheritance();\n        }\n\n        [Fact]\n        public void Settings_Without_Inheritance_Presets_And_Current_Object()\n        {\n            InitializeStreams(DefaultThemeType.WithPresetsAndCurrentObject, false);\n            Check_Without_Inheritance();\n        }\n\n        private void Check_Without_Inheritance()\n        {\n            var options = new LiquidThemeEngineOptions();\n            var shopifyLiquidThemeEngine = GetThemeEngine(false, options);\n            var settings = shopifyLiquidThemeEngine.GetSettings();\n            Assert.Equal(\"#fff\", settings[\"background_color\"]);\n            Assert.Equal(\"#000\", settings[\"foreground_color\"]);\n        }\n\n        [Fact]\n        public void Settings_Inheritance_Backward_Compatibility_Base_Theme_Name()\n        {\n            var options = new LiquidThemeEngineOptions()\n            {\n#pragma warning disable 618\n                BaseThemeName = \"odt\"\n#pragma warning restore 618\n            };\n\n            Check_Inheritance_Backward_Compatibility(options);\n        }\n\n        [Fact]\n        public void Settings_Inheritance_Backward_Compatibility_Base_Theme_Path_Without_Merge()\n        {\n            var options = new LiquidThemeEngineOptions()\n            {\n                BaseThemePath = $\"odt{Path.DirectorySeparatorChar}default\"\n            };\n\n            Check_Inheritance_Backward_Compatibility(options);\n        }\n\n        private void Check_Inheritance_Backward_Compatibility(LiquidThemeEngineOptions options)\n        {\n            var shopifyLiquidThemeEngine = GetThemeEngine(true, options);\n            InitializeStreams(DefaultThemeType.WithoutPresets, false);\n            var settings = shopifyLiquidThemeEngine.GetSettings();\n            Assert.False(settings.ContainsKey(\"background_color\"));\n            Assert.Equal(\"#333\", settings[\"foreground_color\"]);\n        }\n\n        [Fact]\n        public void Settings_Inheritance_Both_Are_Flat()\n        {\n            InitializeStreams(DefaultThemeType.WithoutPresets, false);\n            Check_Colors_In_Merged_Settings();\n        }\n\n        [Fact]\n        public void Settings_Inheritance_Base_Has_Preset_Current_Is_Flat()\n        {\n            InitializeStreams(DefaultThemeType.WithPresets, false);\n            Check_Colors_In_Merged_Settings();\n        }\n\n        [Fact]\n        public void Settings_Inheritance_Current_Select_Preset_From_Base()\n        {\n            InitializeStreams(DefaultThemeType.WithPresets, true);\n            Check_Colors_In_Merged_Settings(true);\n        }\n\n        private void Check_Colors_In_Merged_Settings(bool isDarkPreset = false)\n        {\n            var options = new LiquidThemeEngineOptions()\n            {\n                BaseThemePath = $\"odt{Path.DirectorySeparatorChar}default\",\n                MergeBaseSettings = true\n            };\n            var shopifyLiquidThemeEngine = GetThemeEngine(true, options);\n            var settings = shopifyLiquidThemeEngine.GetSettings();\n            Assert.Equal(isDarkPreset ? \"#000\" : \"#fff\", settings[\"background_color\"]);\n            Assert.Equal(\"#333\", settings[\"foreground_color\"]);\n        }\n\n        private void InitializeStreams(DefaultThemeType defaultThemeType, bool currentThemeHasSelectedPreset)\n        {\n            var defaultThemeJson = defaultThemeType switch\n            {\n                DefaultThemeType.WithoutPresets => DefaultSettingsWithoutPresets,\n                DefaultThemeType.WithPresets => DefaultSettingsWithPresets,\n                DefaultThemeType.WithPresetsAndCurrentObject => DefaultSettingsWithPresetsAndCurrentObject,\n                _ => throw new ArgumentOutOfRangeException(nameof(defaultThemeType), defaultThemeType, null)\n            };\n\n            InitializeStream(_defaultThemeStreamWriter, out var defaultThemeStream, defaultThemeJson);\n            DefaultThemeStream = defaultThemeStream;\n\n            InitializeStream(_currentThemeStreamWriter, out var currentThemeStream, currentThemeHasSelectedPreset ? CurrentSettingsWithSelectedPreset : CurrentSettingsWithoutSelectedPreset);\n            CurrentThemeStream = currentThemeStream;\n        }\n\n        private static void InitializeStream<T>(StreamWriter writer, out Stream stream, T content)\n        {\n            // Clear\n            writer.BaseStream.Position = 0;\n            writer.Flush();\n            // Write\n            writer.Write(content);\n            // Reset position\n            writer.BaseStream.Position = 0;\n            // Copy, because stream reader will automatically destroy it\n            stream = new MemoryStream();\n            writer.BaseStream.CopyTo(stream);\n            stream.Position = 0;\n        }\n\n        private IContentBlobProvider ContentBlobProvider\n        {\n            get\n            {\n                var mock = new Mock<IContentBlobProvider>();\n                var baseThemeSettingsPath = Path.Combine(ThemesPath, BaseThemePath, SettingsPath);\n                mock.Setup(service => service.PathExists(baseThemeSettingsPath))\n                    .Returns(() => true);\n                mock.Setup(service => service.OpenRead(baseThemeSettingsPath))\n                    .Returns(() => DefaultThemeStream);\n                var currentThemeSettingsPath = Path.Combine(ThemesPath, CurrentThemePath, SettingsPath);\n                mock.Setup(service => service.PathExists(currentThemeSettingsPath))\n                    .Returns(() => true);\n                mock.Setup(service => service.OpenRead(currentThemeSettingsPath))\n                    .Returns(() => CurrentThemeStream);\n                return mock.Object;\n            }\n        }\n\n        public static IStorefrontMemoryCache MemoryCache\n        {\n            get\n            {\n                var cacheEntry = Mock.Of<ICacheEntry>();\n                Mock.Get(cacheEntry).SetupGet(c => c.ExpirationTokens).Returns(new List<IChangeToken>());\n                var memoryCacheMock = new Mock<IStorefrontMemoryCache>();\n                memoryCacheMock\n                    .Setup(x => x.CreateEntry(It.IsAny<string>()))\n                    .Returns((string key) => cacheEntry);\n\n                memoryCacheMock.Setup(c => c.GetDefaultCacheEntryOptions()).Returns(\n                    new MemoryCacheEntryOptions());\n                return memoryCacheMock.Object;\n            }\n        }\n\n        private static IWorkContextAccessor GetWorkContextAccessor(bool useThemesInheritance)\n        {\n            var mock = new Mock<IWorkContextAccessor>();\n            mock.Setup(service => service.WorkContext)\n                .Returns(() => new WorkContext\n                {\n                    CurrentStore = new Store\n                    {\n                        Id = \"odt\",\n                        ThemeName = useThemesInheritance ? \"current\" : \"default\"\n                    }\n                });\n            return mock.Object;\n        }\n\n        private static IHttpContextAccessor HttpContextAccessor\n        {\n            get\n            {\n                var mock = new Mock<IHttpContextAccessor>();\n                mock.Setup(service => service.HttpContext.Request.Query[\"preview_mode\"])\n                    .Returns(() => Enumerable.Empty<string>().ToArray());\n                return mock.Object;\n            }\n        }\n\n        private ShopifyLiquidThemeEngine GetThemeEngine(bool useThemesInheritance, LiquidThemeEngineOptions options)\n        {\n            return new ShopifyLiquidThemeEngine(MemoryCache, GetWorkContextAccessor(useThemesInheritance), HttpContextAccessor,\n                null, ContentBlobProvider, null, new OptionsWrapper<LiquidThemeEngineOptions>(options), new FeaturesAgent(), null);\n        }\n\n        public void Dispose()\n        {\n            MemoryCache.Dispose();\n            _defaultThemeStreamWriter.Dispose();\n            _currentThemeStreamWriter.Dispose();\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Model/MoneyOperationTests.cs",
    "content": "using VirtoCommerce.Storefront.Model.Common;\nusing Xunit;\nusing StorefrontLanguage = VirtoCommerce.Storefront.Model.Language;\n\nnamespace VirtoCommerce.Storefront.Tests.Model\n{\n    [Trait(\"Category\", \"CI\")]\n    public class MoneyOperationTests\n    {\n        private static readonly StorefrontLanguage TestLanguage = new StorefrontLanguage(\"en-US\");\n        private static readonly Currency TestCurrency = new Currency(TestLanguage, \"TPT\", \"Test points\", \"T\", 1.0m);\n\n        [Theory]\n        [InlineData(0.0, 0.0, 0.0, \"T0.00\", \"T0\", \"0\")]\n        [InlineData(0.99, 0.99, 0.99, \"T0.99\", \"T1\", \"1\")]\n        [InlineData(0.999, 1.00, 0.99, \"T1.00\", \"T1\", \"1\")]\n        [InlineData(1.445, 1.45, 1.44, \"T1.45\", \"T1\", \"1\")]\n        [InlineData(1.455, 1.46, 1.45, \"T1.46\", \"T1\", \"1\")]\n        //[InlineData( -1.445,  -1.45,  -1.44, \"(T1.45)\", \"(T1)\", \"(1)\")]\n        //[InlineData( -1.455,  -1.46,  -1.45, \"(T1.46)\", \"(T1)\", \"(1)\")]\n        [InlineData(12.34, 12.34, 12.34, \"T12.34\", \"T12\", \"12\")]\n        [InlineData(12.345, 12.35, 12.34, \"T12.35\", \"T12\", \"12\")]\n        [InlineData(123.456, 123.46, 123.45, \"T123.46\", \"T123\", \"123\")]\n        [InlineData(123.5, 123.5, 123.5, \"T123.50\", \"T124\", \"124\")]\n        public void TestGettingMoneyProperties(decimal internalAmount, decimal expectedAmount,\n            decimal expectedTruncatedAmount, string expectedFormattedAmount, string expectedFormattedAmountWithoutPoint,\n            string expectedFormattedAmountWithoutPointAndCurrency)\n        {\n            // Arrange\n            var money = new Money(internalAmount, TestCurrency);\n\n            // Act & Assert\n            Assert.Equal(internalAmount, money.InternalAmount);\n            Assert.Equal(expectedAmount, money.Amount);\n            Assert.Equal(expectedTruncatedAmount, money.TruncatedAmount);\n            Assert.Equal(expectedFormattedAmount, money.FormattedAmount);\n            Assert.Equal(expectedFormattedAmountWithoutPoint, money.FormattedAmountWithoutPoint);\n            Assert.Equal(expectedFormattedAmountWithoutPointAndCurrency, money.FormattedAmountWithoutPointAndCurrency);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/ResponseCaching/ResponseCachingTests.cs",
    "content": "using System;\nusing System.IO;\nusing System.Net.Http;\nusing System.Text;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.AspNetCore.Mvc.Testing;\nusing Microsoft.AspNetCore.TestHost;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Hosting;\nusing Microsoft.Net.Http.Headers;\nusing Moq;\nusing VirtoCommerce.LiquidThemeEngine;\nusing VirtoCommerce.Storefront.Model;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Stores;\nusing Xunit;\nusing Language = VirtoCommerce.Storefront.Model.Language;\n\nnamespace VirtoCommerce.Storefront.Tests.OutputCache\n{\n    public class AppTestFixture : WebApplicationFactory<Startup>\n    {\n        protected override IHostBuilder CreateHostBuilder()\n        {\n            var builder = Host.CreateDefaultBuilder()\n                              .ConfigureWebHostDefaults(x =>\n                              {\n                                  x.UseStartup<Startup>().UseTestServer();\n                              });\n            return builder;\n        }\n    }\n\n    [Trait(\"Category\", \"CI\")]\n    public sealed class ResponseCachingTests : IClassFixture<AppTestFixture>, IDisposable\n    {\n        private readonly AppTestFixture _factory;\n        public ResponseCachingTests(AppTestFixture factory)\n        {\n            _factory = factory;\n            Client = factory\n                .WithWebHostBuilder(\n                    builder => builder.ConfigureTestServices(services =>\n                    {\n                        var mockEngine = new Mock<ILiquidThemeEngine>();\n                        mockEngine.Setup(x => x.ReadLocalization()).Returns(new Newtonsoft.Json.Linq.JObject());\n                        mockEngine.Setup(x => x.GetAssetStreamAsync(It.IsAny<string>())).Returns(Task.FromResult((Stream)new MemoryStream(Encoding.UTF8.GetBytes(\"some data\"))));\n                        mockEngine.Setup(x => x.ResolveTemplatePath(It.IsIn(new[] { \"index\" }))).Returns(\"path\");\n                        services.AddSingleton(mockEngine.Object);\n                        var mockStoreService = new Mock<IStoreService>();\n                        mockStoreService.Setup(x => x.GetAllStoresAsync()).ReturnsAsync(new Store[] { new Store { Id = \"Electronics\", DefaultLanguage = new Language(\"en-US\") } });\n                        services.AddSingleton(mockStoreService.Object);\n\n                        var mockCurrencyService = new Mock<ICurrencyService>();\n                        mockCurrencyService.Setup(x => x.GetAllCurrenciesAsync(It.IsAny<Language>())).ReturnsAsync(new Currency[] { });\n                        services.AddSingleton(mockCurrencyService.Object);\n\n                    })\n                ).CreateClient();\n            //Make initial request to get anonymous cookies\n            Client.GetAsync(\"/Electronics/en-US/common/notheme\").GetAwaiter().GetResult();\n        }\n        public HttpClient Client { get; }\n\n\n        //[Theory]\n        //[InlineData(\"/Electronics/en-US/themes/localization.json\")]\n        //[InlineData(\"/Electronics/en-US/themes/assets/shop.js\")]\n        //public async Task ServesThemesAssets(string url)\n        //{\n\n        //    // Act & Assert\n        //    var initialResponse = await Client.GetAsync(url);\n        //    var subsequentResponse = await Client.GetAsync(url);\n\n        //    await AssertCachedResponseAsync(initialResponse, subsequentResponse);\n\n        //}\n\n        private static async Task AssertCachedResponseAsync(HttpResponseMessage initialResponse, HttpResponseMessage subsequentResponse)\n        {\n            initialResponse.EnsureSuccessStatusCode();\n            subsequentResponse.EnsureSuccessStatusCode();\n\n            foreach (var header in initialResponse.Headers)\n            {\n                Assert.Equal(initialResponse.Headers.GetValues(header.Key), subsequentResponse.Headers.GetValues(header.Key));\n            }\n            Assert.True(subsequentResponse.Headers.Contains(HeaderNames.Age));\n            Assert.Equal(await initialResponse.Content.ReadAsStringAsync(), await subsequentResponse.Content.ReadAsStringAsync());\n        }\n\n        public void Dispose()\n        {\n            Client?.Dispose();\n        }\n    }\n\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Routing/Infrastructure/DummyAntiforgery.cs",
    "content": "using System.Threading.Tasks;\nusing Microsoft.AspNetCore.Antiforgery;\nusing Microsoft.AspNetCore.Http;\n\nnamespace VirtoCommerce.Storefront.Tests.Routing.Infrastructure\n{\n    /// <summary>\n    /// Test implementation of <see cref=\"IAntiforgery\"/> that completely disables antiforgery checks.\n    /// </summary>\n    public class DummyAntiforgery : IAntiforgery\n    {\n        private static readonly AntiforgeryTokenSet EmptyAntiforgeryTokenSet =\n            new AntiforgeryTokenSet(string.Empty, string.Empty, string.Empty, string.Empty);\n\n\n        /// <inheritdoc />\n        public AntiforgeryTokenSet GetAndStoreTokens(HttpContext httpContext)\n        {\n            return EmptyAntiforgeryTokenSet;\n        }\n\n        /// <inheritdoc />\n        public AntiforgeryTokenSet GetTokens(HttpContext httpContext)\n        {\n            return EmptyAntiforgeryTokenSet;\n        }\n\n        /// <inheritdoc />\n        public Task<bool> IsRequestValidAsync(HttpContext httpContext)\n        {\n            return Task.FromResult(true);\n        }\n\n        /// <inheritdoc />\n        public Task ValidateRequestAsync(HttpContext httpContext)\n        {\n            return Task.CompletedTask;\n        }\n\n        /// <inheritdoc />\n        public void SetCookieTokenAndHeader(HttpContext httpContext)\n        {\n            // This IAntiforgery implementation does not perform any checks,\n            // so body of this method intentionally left blank.\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Routing/Infrastructure/RoutingDataResult.cs",
    "content": "namespace VirtoCommerce.Storefront.Tests.Routing.Infrastructure\n{\n    /// <summary>\n    /// Result of request processing produced by <see cref=\"RoutingTestingActionFilter\"/>.\n    /// It contains some data that may be useful to test action routing - \n    /// i.e. requested path, type of controller that should process that request,\n    /// name of method that should handle that request, and arguments that were passed\n    /// with that request.\n    /// </summary>\n    public class RoutingDataResult\n    {\n        /// <summary>\n        /// Creates a new instance of <see cref=\"RoutingDataResult\"/>.\n        /// </summary>\n        /// <param name=\"requestPath\">Path that was requested by client.</param>\n        /// <param name=\"controllerTypeName\">Full type name of controller that would process the request.</param>\n        /// <param name=\"controllerMethodName\">Fully-qualified name of controller method that would be used\n        /// to process request.</param>\n        /// <param name=\"arguments\">A name-value dictionary containing arguments passed with the request.</param>\n        public RoutingDataResult(string controllerTypeName, string controllerMethodName)\n        {\n            ControllerTypeName = controllerTypeName;\n            ControllerMethodName = controllerMethodName;\n        }\n\n        /// <summary>\n        /// Full type name of controller that would process the request.\n        /// </summary>\n        public string ControllerTypeName { get; }\n\n        /// <summary>\n        /// Fully-qualified name of controller method that would be used to process request.\n        /// </summary>\n        public string ControllerMethodName { get; }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Routing/Infrastructure/RoutingTestingActionFilter.cs",
    "content": "using Microsoft.AspNetCore.Mvc;\nusing Microsoft.AspNetCore.Mvc.Filters;\n\nnamespace VirtoCommerce.Storefront.Tests.Routing.Infrastructure\n{\n    /// <summary>\n    /// Test filter that helps to test application routing. It short-circuits request processing\n    /// and returns routing data instead of actual action result, so the target controller method \n    /// does not actually get executed.\n    /// </summary>\n    public class RoutingTestingActionFilter : IActionFilter\n    {\n        /// <inheritdoc />\n        public void OnActionExecuting(ActionExecutingContext context)\n        {\n            var controllerTypeName = context.Controller.GetType().FullName;\n            var methodName = context.ActionDescriptor.DisplayName;\n            var routingDataResult = new RoutingDataResult(controllerTypeName, methodName);\n\n            context.Result = new JsonResult(routingDataResult);\n        }\n\n        /// <inheritdoc />\n        public void OnActionExecuted(ActionExecutedContext context)\n        {\n            // Actual action does not get executed, so body of this method intentionally left blank.\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Routing/PathStringExtensionsTests.cs",
    "content": "using Microsoft.AspNetCore.Http;\nusing VirtoCommerce.Storefront.Extensions;\nusing VirtoCommerce.Storefront.Model.Stores;\nusing Xunit;\n\nnamespace VirtoCommerce.Storefront.Tests.Routing\n{\n    [Trait(\"Category\", \"CI\")]\n    public class PathStringExtensionsTests\n    {\n        [Theory]\n        [InlineData(\"/store\", \"/store\")]\n        [InlineData(\"/store/path\", \"/store/path\")]\n        [InlineData(\"/\", \"/\")]\n        [InlineData(\"\", \"\")]\n        public void TrimStorePath_NoStoreUrls_DoesNothing(string pathToHandle, string expectedPath)\n        {\n            // Arrange\n            var storeStub = new Store();\n\n            // Act\n            var trimmedPath = new PathString(pathToHandle).TrimStorePath(storeStub);\n\n            // Assert\n            Assert.Equal(expectedPath, trimmedPath);\n        }\n\n        [Theory]\n        [InlineData(\"/store\", \"/store\")]\n        [InlineData(\"/store/path\", \"/store/path\")]\n        [InlineData(\"/\", \"/\")]\n        [InlineData(\"\", \"\")]\n        public void TrimStorePath_NoPathInStoreUrl_DoesNothing(string pathToHandle, string expectedPath)\n        {\n            // Arrange\n            var storeStub = new Store() { Url = \"http://localhost/\" };\n\n            // Act\n            var trimmedPath = new PathString(pathToHandle).TrimStorePath(storeStub);\n\n            // Assert\n            Assert.Equal(expectedPath, trimmedPath);\n        }\n\n        [Theory]\n        [InlineData(\"/store\", \"/store\")]\n        [InlineData(\"/store/path\", \"/store/path\")]\n        [InlineData(\"/\", \"/\")]\n        [InlineData(\"\", \"\")]\n        public void TrimStorePath_NoPathInStoreSecureUrl_DoesNothing(string pathToHandle, string expectedPath)\n        {\n            // Arrange\n            var storeStub = new Store() { SecureUrl = \"http://localhost/\" };\n\n            // Act\n            var trimmedPath = new PathString(pathToHandle).TrimStorePath(storeStub);\n\n            // Assert\n            Assert.Equal(expectedPath, trimmedPath);\n        }\n\n        [Theory]\n        [InlineData(\"/store/Electronics\", \"/Electronics\")]\n        [InlineData(\"/Electronics\", \"/Electronics\")]\n        [InlineData(\"/store/store/Electronics\", \"/store/Electronics\")]\n        [InlineData(\"/account/store/Electronics\", \"/account/store/Electronics\")]\n        public void TrimStorePath_PathInStoreUrl_TrimsFirstOccurrenceFromBeginning(string pathToHandle, string expectedPath)\n        {\n            // Arrange\n            var storeStub = new Store() { Url = \"http://localhost/store\" };\n\n            // Act\n            var trimmedPath = new PathString(pathToHandle).TrimStorePath(storeStub);\n\n            // Assert\n            Assert.Equal(expectedPath, trimmedPath);\n        }\n\n        [Theory]\n        [InlineData(\"/store/Electronics\", \"/Electronics\")]\n        [InlineData(\"/Electronics\", \"/Electronics\")]\n        [InlineData(\"/store/store/Electronics\", \"/store/Electronics\")]\n        [InlineData(\"/account/store/Electronics\", \"/account/store/Electronics\")]\n        public void TrimStorePath_PathInStoreSecureUrl_TrimsFirstOccurrenceFromBeginning(string pathToHandle, string expectedPath)\n        {\n            // Arrange\n            var storeStub = new Store() { SecureUrl = \"http://localhost/store\" };\n\n            // Act\n            var trimmedPath = new PathString(pathToHandle).TrimStorePath(storeStub);\n\n            // Assert\n            Assert.Equal(expectedPath, trimmedPath);\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Scriban/ScribanTests.cs",
    "content": "using Scriban;\nusing Scriban.Runtime;\nusing VirtoCommerce.Storefront.Model.Common;\nusing VirtoCommerce.Storefront.Model.Stores;\nusing Xunit;\n\nnamespace VirtoCommerce.Storefront.Tests.Scriban\n{\n    public class ScribanTests\n    {\n        /// <summary>\n        /// https://github.com/lunet-io/scriban/issues/102\n        /// </summary>\n        [Fact]\n        public void LiquidRawBlock_ParsingError()\n        {\n            var parsedTemplate = Template.ParseLiquid(\"{% raw %}{% endraw %}{{ some_var }}\");\n            Assert.False(parsedTemplate.HasErrors);\n        }\n\n        //[Fact]\n        //public void Capture_With_Elsif()\n        //{\n        //    var template = \"{% capture tag_label_template %}tags.{{ tag.group_type }}.{% if tag.lower and tag.upper %}between{% elsif tag.lower %}greater{% elsif tag.upper %}less{% endif %}{% endcapture %} {{ tag_label_template }}\";\n        //    var parsedTemplate = Template.ParseLiquid(template);\n        //    Assert.False(parsedTemplate.HasErrors);\n\n        //    var scriptObject = new ScriptObject();\n        //    scriptObject.SetValue(\"tag\", new Tag { GroupType = \"pricerange\", Lower = \"11$\" }, true);\n        //    var context = new TemplateContext();\n        //    context.PushGlobal(scriptObject);\n\n        //    var result = parsedTemplate.Render(context);\n        //    Assert.Equal(\"tags.pricerange.greater\", result);\n        //}\n        //[Fact]\n        //public void Call_Pipe_Function_With_Named_Argument_Throw_Exception()\n        //{\n        //    var parsedTemplate = Template.ParseLiquid(\"{{ math.plus value: 1 with: 2 }}\");\n        //    Assert.False(parsedTemplate.HasErrors);\n\n        //    var scriptObject = new ScriptObject();\n        //    scriptObject.Import(typeof(MyFunctions));\n        //    var context = new TemplateContext();\n        //    context.PushGlobal(scriptObject);\n\n        //    var result = parsedTemplate.Render(context);\n        //    Assert.Equal(\"12\", result);\n        //}\n\n        [Fact]\n        public void Function_With_Context_And_Params_Throw_Overflow_Exception()\n        {\n            var parsedTemplate = Template.ParseLiquid(\"{{ '{0}{1}' | t: '1', '1'  }}\");\n            Assert.False(parsedTemplate.HasErrors);\n\n            var scriptObject = new ScriptObject();\n            scriptObject.Import(typeof(MyFunctions));\n            var context = new TemplateContext();\n            context.PushGlobal(scriptObject);\n\n            var result = parsedTemplate.Render(context);\n            Assert.Equal(\"11\", result);\n        }\n\n\n        //[Fact]\n        //public void Pipe_Arguments_Mismatch_Errors()\n        //{\n        //    var parsedTemplate = Template.ParseLiquid(\"{{ 22.00 | A | B | string.upcase }}\");\n        //    Assert.False(parsedTemplate.HasErrors);\n\n        //    var scriptObject = new ScriptObject();\n        //    scriptObject.Import(typeof(MyFunctions));\n        //    var context = new TemplateContext();\n        //    context.PushGlobal(scriptObject);\n\n        //    parsedTemplate.Render(context);\n        //}\n\n        //[Fact]\n        //public void IndexAccess_For_List()\n        //{\n        //    var parsedTemplate = Template.ParseLiquid(\"{{ products.size > 0 }} {{ products['headphones'].id }} {{ product = products['headphones'] }} {{ products[product.id].id }}\");\n        //    Assert.False(parsedTemplate.HasErrors);\n\n        //    var scriptObject = new ScriptObject();\n        //    scriptObject.Import(new TestContext { Products = new MutablePagedList<Store>(new List<Store> { new Store { Id = \"headphones\" } }) });\n        //    var context = new TemplateContext();\n        //    context.PushGlobal(scriptObject);\n\n        //    var result = parsedTemplate.Render(context);\n        //    Assert.Equal(\"true headphones headphones\", result);\n        //}\n\n        //[Fact]\n        //public void ParsingError()\n        //{\n        //    var parsedTemplate = Template.ParseLiquid(File.ReadAllText(@\"C:\\Projects\\VirtoCommerce\\vc-storefront-core\\VirtoCommerce.Storefront.Tests\\Scriban\\test.liquid\"));\n        //    Assert.False(parsedTemplate.HasErrors);\n        //}\n    }\n\n\n    public class TestContext\n    {\n        public IMutablePagedList<Store> Products { get; set; }\n    }\n    public class Tag\n    {\n        public string GroupType { get; set; }\n        public string Lower { get; set; }\n        public string Upper { get; set; }\n\n    }\n    public static class MyFunctions\n    {\n        public static string T(object input, params object[] variables)\n        {\n            return string.Format(input.ToString(), variables);\n        }\n\n        public static string A(TemplateContext context, object input, string currencyCode = null)\n        {\n            return input.ToString() + \"A\";\n        }\n        public static string B(object input)\n        {\n            return input.ToString() + \"B\";\n        }\n\n    }\n\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/Scriban/test.liquid",
    "content": "{%- unless template == 'index' or template == 'cart' -%}\n<nav class=\"breadcrumb\" role=\"navigation\" aria-label=\"breadcrumbs\">\n  <a href=\"{{ \"/\" | absolute_url }}\" title=\"{{ 'general.breadcrumbs.home_link_title' | t }}\">{{ 'general.breadcrumbs.home' | t }}</a>\n  {%- if template contains 'vendor' -%}\n    <span class=\"divider\" aria-hidden=\"true\">&rsaquo;</span>\n    <span class=\"breadcrumb--truncate\">{{ vendor.name }}</span>\n  {%- elsif template contains 'product' -%}\n    {%- if collection -%}   \n      {%- for parent in collection.parents -%}\n         <span class=\"divider\" aria-hidden=\"true\">&rsaquo;</span>\n        {%- capture url -%}{{ parent.handle | absolute_url }}{%- endcapture -%}\n        {{ parent.title | link_to: url }}\n      {%- endfor -%}     \n    {%- endif -%}\n    <span class=\"divider\" aria-hidden=\"true\">&rsaquo;</span>\n    <span class=\"breadcrumb--truncate\">{{ product.title }}</span>\n  {%- elsif template contains 'collection' and collection.handle -%}\n    {%- if current_tags -%}\n      {%- capture url -%}{{ collection.handle | absolute_url }}{%- endcapture -%}\n      {{ collection.title | link_to: url }}\n      <span class=\"divider\" aria-hidden=\"true\">&rsaquo;</span>\n      {%- comment -%}\n        Loop through tags and our custom tag array to strip out prepended tag categories if they exist.\n        snippet/advanced-tag-loop.liquid is required for this to work.\n      {%- endcomment -%}\n      {%- for tag in current_tags -%}\n        {%- if forloop.first -%}\n          {%- assign additional_tag = false -%}\n        {%- else -%}\n          {%- assign additional_tag = true -%}\n        {%- endif -%}\n        {%- comment -%}\n          Track whether the tag gets printed\n        {%- endcomment -%}\n        {%- for cat_item in collection.all_tags -%}\n          {%- unless cat_item == '' -%}\n            {%- if tag == cat_item -%}\n              {%- if additional_tag -%}\n                <span>+</span>\n              {%- endif -%}\n              {%- include 'tag-label' tag: cat_item -%}\n              <span>{{ tag_label | escape }}</span>\n            {%- endif -%}\n          {%- endunless -%}\n        {%- endfor -%}\n        {%- comment -%}\n          We have a regular tag that wasn't printed, so print it now\n        {%- endcomment -%}\n      {%- endfor -%}\n    {%- else -%}\n      {%- for parent in collection.parents -%}\n        {%- unless parent.title == collection.title -%}\n          <span class=\"divider\" aria-hidden=\"true\">&rsaquo;</span>\n          {%- capture url -%}{{ parent.handle | absolute_url }}{%- endcapture -%}\n          {{ parent.title | link_to: url}}\n        {%- endunless -%}\n      {%- endfor -%}\n      <span class=\"divider\" aria-hidden=\"true\">&rsaquo;</span>\n      <span>{{ collection.title }}</span>\n  {%- endif -%}\n  {%- elsif template == 'blog' -%}\n    <span class=\"divider\" aria-hidden=\"true\">&rsaquo;</span>\n    {%- if current_tags -%}\n      {%- assign blog_url = blog.url | absolute_url -%}\n      {{ blog.title | link_to: blog_url }}\n      <span class=\"divider\" aria-hidden=\"true\">&rsaquo;</span>\n      <span>{{ current_tags | join: \" + \" }}</span>\n    {%- else -%}\n    <span>{{ blog.title }}</span>\n    {%- endif -%}\n  {%- elsif template == 'article' -%}\n    <span class=\"divider\" aria-hidden=\"true\">&rsaquo;</span>\n    {%- assign blog_url = blog.url | absolute_url -%}\n    {{ blog.title | link_to: blog_url }}\n    <span class=\"divider\" aria-hidden=\"true\">&rsaquo;</span>\n    <span>{{ article.title }}</span>\n  {%- elsif template contains 'page' -%}\n    <span class=\"divider\" aria-hidden=\"true\">&rsaquo;</span>\n   <span>{{ page.title }}</span>\n  {%- else -%}\n    <span class=\"divider\" aria-hidden=\"true\">&rsaquo;</span>\n   <span>{{ page_title }}</span>\n  {%- endif -%}\n</nav>\n{%- endunless -%}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/ValueObjectTests.cs",
    "content": "using System.Collections.Generic;\nusing System.Linq;\nusing VirtoCommerce.Storefront.Model.Common;\nusing Xunit;\n\nnamespace VirtoCommerce.Storefront.Tests\n{\n    [Trait(\"Category\", \"Unit\")]\n    public class ValueObjectTests\n    {\n        public class ComplexObject : ValueObject\n        {\n            public string SimpleProperty { get; set; }\n            public string AnotherSimpleProperty { get; set; }\n            public List<string> ListProperty { get; set; }\n            public List<string> AnotherListProperty { get; set; }\n        }\n\n        [Fact]\n        public void ObjectsWithTheSameValuesShouldBeEqual()\n        {\n            var value1 = new ComplexObject\n            {\n                SimpleProperty = \"A\",\n                ListProperty = new List<string> { \"A\", \"B\", \"C\" }\n            };\n            var value2 = new ComplexObject\n            {\n                SimpleProperty = \"A\",\n                ListProperty = new List<string> { \"A\", \"B\", \"C\" }\n            };\n            var code1 = value1.GetHashCode();\n            var code2 = value2.GetHashCode();\n            Assert.Equal(code1, code2);\n            Assert.Equal(value1, value2);\n        }\n\n        [Fact]\n        public void ObjectsWithDifferentValuesShouldNotBeEqual()\n        {\n            var objectsWithDifferentValues = GetObjectsWithDifferentValues();\n\n            // Compare each object with all other objects\n            for (var i = 0; i < objectsWithDifferentValues.Count; i++)\n            {\n                for (var j = 0; j < objectsWithDifferentValues.Count; j++)\n                {\n                    if (i != j)\n                    {\n                        var object1 = objectsWithDifferentValues[i];\n                        var object2 = objectsWithDifferentValues[j];\n\n                        var equals = object1.Equals(object2);\n\n                        Assert.False(equals, $\"Objects #{i} and #{j} must not be equal.\");\n                    }\n                }\n            }\n        }\n\n        [Fact]\n        public void ObjectsWithDifferentValuesShouldHaveDifferentCacheKeys()\n        {\n            var objectsWithDifferentValues = GetObjectsWithDifferentValues();\n\n            var cacheKeys = objectsWithDifferentValues.Select(x => x.GetCacheKey()).ToList();\n            var uniqueCacheKeys = cacheKeys.Distinct().ToList();\n\n            Assert.Equal(objectsWithDifferentValues.Count, uniqueCacheKeys.Count);\n        }\n\n\n        private static IList<ComplexObject> GetObjectsWithDifferentValues()\n        {\n            return new[]\n            {\n                // All properties are null\n                new ComplexObject(),\n\n                new ComplexObject { SimpleProperty = \"\" },\n                new ComplexObject { SimpleProperty = \"null\" },\n\n                new ComplexObject { AnotherSimpleProperty = \"\" },\n                new ComplexObject { AnotherSimpleProperty = \"null\" },\n\n                // ListProperty is not null\n                new ComplexObject { ListProperty = new List<string>() },\n                new ComplexObject { ListProperty = new List<string> { null } },\n                new ComplexObject { ListProperty = new List<string> { \"\" } },\n                new ComplexObject { ListProperty = new List<string> { \"null\" } },\n\n                // AnotherListProperty is not null\n                new ComplexObject { AnotherListProperty = new List<string>() },\n                new ComplexObject { AnotherListProperty = new List<string> { null } },\n                new ComplexObject { AnotherListProperty = new List<string> { \"\" } },\n                new ComplexObject { AnotherListProperty = new List<string> { \"null\" } },\n            };\n        }\n    }\n}\n"
  },
  {
    "path": "VirtoCommerce.Storefront.Tests/VirtoCommerce.Storefront.Tests.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk\">\n  <PropertyGroup>\n    <TargetFramework>net8.0</TargetFramework>\n    <IsPackable>false</IsPackable>\n  </PropertyGroup>\n  <ItemGroup>\n    <PackageReference Include=\"Bogus\" Version=\"35.5.0\" />\n    <FrameworkReference Include=\"Microsoft.AspNetCore.App\" />\n    <PackageReference Include=\"coverlet.collector\" Version=\"6.0.1\">\n      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>\n      <PrivateAssets>all</PrivateAssets>\n    </PackageReference>\n    <PackageReference Include=\"Microsoft.AspNetCore.Mvc.NewtonsoftJson\" Version=\"8.0.0\" />\n    <PackageReference Include=\"Microsoft.AspNetCore.Mvc.Testing\" Version=\"8.0.3\" />\n    <PackageReference Include=\"FluentValidation\" Version=\"11.8.1\" />\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"17.8.0\" />\n    <PackageReference Include=\"Moq\" Version=\"4.20.70\" />\n    <PackageReference Include=\"MSTest.TestAdapter\" Version=\"3.1.1\" />\n    <PackageReference Include=\"MSTest.TestFramework\" Version=\"3.1.1\" />\n    <PackageReference Include=\"PagedList.Core\" Version=\"1.17.4\" />\n    <PackageReference Include=\"Scriban\" Version=\"5.9.0\" />\n    <PackageReference Include=\"xunit\" Version=\"2.6.2\" />\n    <PackageReference Include=\"xunit.runner.console\" Version=\"2.6.2\">\n      <PrivateAssets>all</PrivateAssets>\n      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>\n    </PackageReference>\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"2.5.4\">\n      <PrivateAssets>all</PrivateAssets>\n      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>\n    </PackageReference>\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\VirtoCommerce.Storefront.Model\\VirtoCommerce.Storefront.Model.csproj\" />\n    <ProjectReference Include=\"..\\VirtoCommerce.Storefront\\VirtoCommerce.Storefront.csproj\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Update=\"Features\\Samples\\empty_file.json\">\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\n    </None>\n    <None Update=\"Features\\Samples\\empty_data.json\">\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\n    </None>\n    <None Update=\"Features\\Samples\\full_data_with_disabled_feature.json\">\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\n    </None>\n    <None Update=\"Features\\Samples\\full_data_with_conflicts.json\">\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\n    </None>\n    <None Update=\"Features\\Samples\\full_data_without_replaces.json\">\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\n    </None>\n    <None Update=\"Features\\Samples\\full_data.json\">\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\n    </None>\n    <None Update=\"Features\\Samples\\test_data.json\">\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\n    </None>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "VirtoCommerce.Storefront.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 17\nVisualStudioVersion = 17.0.32112.339\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"VirtoCommerce.Storefront\", \"VirtoCommerce.Storefront\\VirtoCommerce.Storefront.csproj\", \"{84C14E0A-0F36-4BB5-9C00-7E8FB72891C2}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"VirtoCommerce.Storefront.Model\", \"VirtoCommerce.Storefront.Model\\VirtoCommerce.Storefront.Model.csproj\", \"{4730CFD4-9D72-4AA4-B819-8A32017D4B86}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"VirtoCommerce.Storefront.Tests\", \"VirtoCommerce.Storefront.Tests\\VirtoCommerce.Storefront.Tests.csproj\", \"{0EC8A6E2-1A58-4125-8F09-243ED02AF1DE}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"VirtoCommerce.LiquidThemeEngine\", \"VirtoCommerce.LiquidThemeEngine\\VirtoCommerce.LiquidThemeEngine.csproj\", \"{21E262AC-A0AB-4A9C-8759-6AFDC9CEE49E}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{84C14E0A-0F36-4BB5-9C00-7E8FB72891C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{84C14E0A-0F36-4BB5-9C00-7E8FB72891C2}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{84C14E0A-0F36-4BB5-9C00-7E8FB72891C2}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{84C14E0A-0F36-4BB5-9C00-7E8FB72891C2}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{4730CFD4-9D72-4AA4-B819-8A32017D4B86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{4730CFD4-9D72-4AA4-B819-8A32017D4B86}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{4730CFD4-9D72-4AA4-B819-8A32017D4B86}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{4730CFD4-9D72-4AA4-B819-8A32017D4B86}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{0EC8A6E2-1A58-4125-8F09-243ED02AF1DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{0EC8A6E2-1A58-4125-8F09-243ED02AF1DE}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{0EC8A6E2-1A58-4125-8F09-243ED02AF1DE}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{0EC8A6E2-1A58-4125-8F09-243ED02AF1DE}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{21E262AC-A0AB-4A9C-8759-6AFDC9CEE49E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{21E262AC-A0AB-4A9C-8759-6AFDC9CEE49E}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{21E262AC-A0AB-4A9C-8759-6AFDC9CEE49E}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{21E262AC-A0AB-4A9C-8759-6AFDC9CEE49E}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {DD0E246E-A0B1-441B-A37C-4367BB52059F}\n\tEndGlobalSection\n\tGlobalSection(Performance) = preSolution\n\t\tHasPerformanceSessions = true\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "azuredeploy.json",
    "content": "{\n  \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n  \"contentVersion\": \"1.0.0.0\",\n  \"parameters\": {\n    \"appServicePlanName\": {\n      \"type\": \"string\",\n      \"metadata\": {\n        \"description\": \"The name of application service plan.\"\n      }\n    },\n    \"siteName\": {\n      \"type\": \"string\"\n    },\n    \"appServicePlanSkuName\": {\n      \"type\": \"string\",\n      \"defaultValue\": \"S1\",\n      \"allowedValues\": [\n        \"F1\",\n        \"D1\",\n        \"B1\",\n        \"B2\",\n        \"B3\",\n        \"S1\",\n        \"S2\",\n        \"S3\",\n        \"P1\",\n        \"P2\",\n        \"P3\",\n        \"P4\"\n      ],\n      \"metadata\": {\n        \"description\": \"Describes plan's pricing tier and capacity. Check details at https://azure.microsoft.com/pricing/details/app-service/\"\n      }\n    },\n    \"virtoCommercePlatformUrl\": {\n      \"type\": \"string\",\n      \"metadata\": {\n        \"description\": \"The endpoint url of Virto Commerce Platform.\"\n      }\n    },\n    \"virtoCommercePlatformUserName\": {\n      \"type\": \"string\",\n      \"metadata\": {\n        \"description\": \"The administrator username of the Virto Commerce Platform.\"\n      }\n    },\n    \"virtoCommercePlatformPassword\": {\n      \"type\": \"securestring\",\n      \"metadata\": {\n        \"description\": \"The administrator password of the Virto Commerce Platform.\"\n      }\n    },\n    \"contentStorageConnectionString\": {\n      \"type\": \"string\",\n      \"metadata\": {\n        \"description\": \"Connection string to content. Check details at https://virtocommerce.com/docs/latest/getting-started/deploy-from-precompiled-binaries-azure/\"\n      }\n    },\n    \"repoUrl\": {\n      \"type\": \"string\",\n      \"defaultValue\": \"https://github.com/VirtoCommerce/vc-storefront\"\n    },\n    \"branch\": {\n      \"type\": \"string\",\n      \"defaultValue\": \"master\"\n    }\n  },\n  \"resources\": [\n    {\n      \"apiVersion\": \"2018-02-01\",\n      \"type\": \"Microsoft.Web/serverfarms\",\n      \"name\": \"[parameters('appServicePlanName')]\",\n      \"location\": \"[resourceGroup().location]\",\n      \"kind\": \"app\",\n      \"sku\": {\n        \"name\": \"[parameters('appServicePlanSkuName')]\",\n        \"capacity\": 1\n      },\n      \"properties\": {\n        \"name\": \"[parameters('appServicePlanName')]\",\n        \"numberOfWorkers\": \"1\",\n        \"reserved\": false\n      }\n    },\n    {\n      \"apiVersion\": \"2018-11-01\",\n      \"type\": \"Microsoft.Web/sites\",\n      \"name\": \"[parameters('siteName')]\",\n      \"location\": \"[resourceGroup().location]\",\n      \"kind\": \"app\",\n      \"dependsOn\": [\n        \"[concat('Microsoft.Web/serverFarms/', parameters('appServicePlanName'))]\"\n      ],\n      \"tags\": {\n        \"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]\": \"empty\"\n      },\n      \"properties\": {\n        \"name\": \"[parameters('siteName')]\",\n        \"serverFarmId\": \"[concat( resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]\",\n        \"siteConfig\": {\n          \"appSettings\": [\n            {\n              \"name\": \"VirtoCommerce:Endpoint:Url\",\n              \"value\": \"[parameters('virtoCommercePlatformUrl')]\"\n            },\n            {\n              \"name\": \"VirtoCommerce:Endpoint:UserName\",\n              \"value\": \"[parameters('virtoCommercePlatformUserName')]\"\n            },\n            {\n              \"name\": \"VirtoCommerce:Endpoint:Password\",\n              \"value\": \"[parameters('virtoCommercePlatformPassword')]\"\n            }\n          ],\n          \"connectionStrings\": [\n            {\n              \"name\": \"ContentConnectionString\",\n              \"connectionString\": \"[parameters('contentStorageConnectionString')]\",\n              \"type\": \"Custom\"\n            }\n          ],\n          \"metadata\": [\n            {\n              \"name\": \"CURRENT_STACK\",\n              \"value\": \"dotnet\"\n            }\n          ],\n          \"netFrameworkVersion\": \"v8.0\"\n        }\n      },\n      \"resources\": [\n        {\n          \"apiVersion\": \"2016-08-01\",\n          \"name\": \"web\",\n          \"type\": \"sourcecontrols\",\n          \"dependsOn\": [\n            \"[resourceId('Microsoft.Web/sites/', parameters('siteName'))]\"\n          ],\n          \"properties\": {\n            \"RepoUrl\": \"[parameters('repoUrl')]\",\n            \"branch\": \"[parameters('branch')]\",\n            \"IsManualIntegration\": true\n          }\n        }\n      ]\n    }\n  ]\n}\n"
  }
]