You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: databasesqlvulnerabilityassessmentscans_server.go
    path of file: ./repos/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/fake
    
    the code of the file until where you have to start completion: //go:build go1.18
// +build go1.18

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

package fake

import (
	"context"
	"errors"
	"fmt"
	azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/v2"
	"net/http"
	"net/url"
	"regexp"
)

// DatabaseSQLVulnerabilityAssessmentScansServer is a fake server for instances of the armsql.DatabaseSQLVulnerabilityAssessmentScansClient type.
type DatabaseSQLVulnerabilityAssessmentScansServer struct {
	// Get is the fake for method DatabaseSQLVulnerabilityAssessmentScansClient.Get
	// HTTP status codes to indicate success: http.StatusOK
	Get func(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName armsql.VulnerabilityAssessmentName, scanID string, options *armsql.DatabaseSQLVulnerabilityAssessmentScansClientGetOptions) (resp azfake.Responder[armsql.DatabaseSQLVulnerabilityAssessmentScansClientGetResponse], errResp azfake.ErrorResponder)

	// NewListBySQLVulnerabilityAssessmentsPager is the fake for method DatabaseSQLVulnerabilityAssessmentScansClient.NewListBySQLVulnerabilityAssessmentsPager
	// HTTP status codes to indicate success: http.StatusOK
	NewListBySQLVulnerabilityAssessmentsPager func(resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName armsql.VulnerabilityAssessmentName, options *armsql.DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions) (resp azfake.PagerResponder[armsql.DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsResponse])
}

// NewDatabaseSQLVulnerabilityAssessmentScansServerTransport creates a new instance of DatabaseSQLVulnerabilityAssessmentScansServerTransport with the provided implementation.
// The returned DatabaseSQLVulnerabilityAssessmentScansServerTransport instance is connected to an instance of armsql.DatabaseSQLVulnerabilityAssessmentScansClient via the
// azcore.ClientOptions.Transporter field in the client's constructor parameters.
func NewDatabaseSQLVulnerabilityAssessmentScansServerTransport(srv *DatabaseSQLVulnerabilityAssessmentScansServer) *DatabaseSQLVulnerabilityAssessmentScansServerTransport {
	return &DatabaseSQLVulnerabilityAssessmentScansServerTransport{
		srv: srv,
		newListBySQLVulnerabilityAssessmentsPager: newTracker[azfake.Page
    
func (d *DatabaseSQLVulnerabilityAssessmentScansServerTransport) dispatchNewListBySQLVulnerabilityAssessmentsPager(req *http.Request) (*http.Response, error) {
	if d.srv.NewListBySQLVulnerabilityAssessmentsPager == nil {
		return nil, &nonRetriableError{errors.New("fake for method NewListBySQLVulnerabilityAssessmentsPager not implemented")}
	}
	newListBySQLVulnerabilityAssessmentsPager := d.newListBySQLVulnerabilityAssessmentsPager.get(req)
	if newListBySQLVulnerabilityAssessmentsPager == nil {
		const regexStr = `/subscriptions/(?P<subscriptionId>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P<resourceGroupName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Sql/servers/(?P<serverName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databases/(?P<databaseName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sqlVulnerabilityAssessments/(?P<vulnerabilityAssessmentName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/scans`
		regex := regexp.MustCompile(regexStr)
		matches := regex.FindStringSubmatch(req.URL.EscapedPath())
		if matches == nil || len(matches) < 5 {
			return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
		}
		resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")])
		if err != nil {
			return nil, err
		}
		serverNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serverName")])
		if err != nil {
			return nil, err
		}
		databaseNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("databaseName")])
		if err != nil {
			return nil, err
		}
		vulnerabilityAssessmentNameParam, err := parseWithCast(matches[regex.SubexpIndex("vulnerabilityAssessmentName")], func(v string) (armsql.VulnerabilityAssessmentName, error) {
			p, unescapeErr := url.PathUnescape(v)
			if unescapeErr != nil {
				return "", unescapeErr
			}
			return armsql.VulnerabilityAssessmentName(p), nil
		})
		if err != nil {
			return nil, err
		}
		resp := d.srv.NewListBySQLVulnerabilityAssessmentsPager(resourceGroupNameParam, serverNameParam, databaseNameParam, vulnerabilityAssessmentNameParam, nil)
		newListBySQLVulnerabilityAssessmentsPager = &resp
		d.newListBySQLVulnerabilityAssessmentsPager.add(req, newListBySQLVulnerabilityAssessmentsPager)
		server.PagerResponderInjectNextLinks(newListBySQLVulnerabilityAssessmentsPager, req, func(page *armsql.DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsResponse, createLink func() string) {
			page.NextLink = to.Ptr(createLink())
		})
	}
	resp, err := server.PagerResponderNext(newListBySQLVulnerabilityAssessmentsPager, req)
	if err != nil {
		return nil, err
	}
	if !contains([]int{http.StatusOK}, resp.StatusCode) {
		d.newListBySQLVulnerabilityAssessmentsPager.remove(req)
		return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)}
	}
	if !server.PagerResponderMore(newListBySQLVulnerabilityAssessmentsPager) {
		d.newListBySQLVulnerabilityAssessmentsPager.remove(req)
	}
	return resp, nil
}