internal ServerAutomaticTuning(ArmResource options, ServerAutomaticTuningData resource) : base(options, resource.Id)
 {
     HasData            = true;
     _data              = resource;
     Parent             = options;
     _clientDiagnostics = new ClientDiagnostics(ClientOptions);
     _serverAutomaticTuningRestClient = new ServerAutomaticTuningRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
Example #2
0
        internal ServerAutomaticTuning(ArmClient client, ResourceIdentifier id) : base(client, id)
        {
            _serverAutomaticTuningClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ResourceType.Namespace, DiagnosticOptions);
            TryGetApiVersion(ResourceType, out string serverAutomaticTuningApiVersion);
            _serverAutomaticTuningRestClient = new ServerAutomaticTuningRestOperations(Pipeline, DiagnosticOptions.ApplicationId, BaseUri, serverAutomaticTuningApiVersion);
#if DEBUG
            ValidateResourceId(Id);
#endif
        }
Example #3
0
 internal ServerAutomaticTuningOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null)
 {
     RestClient         = new ServerAutomaticTuningRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
     _clientDiagnostics = clientDiagnostics;
     _pipeline          = pipeline;
 }
 internal ServerAutomaticTuning(ArmClientOptions clientOptions, TokenCredential credential, Uri uri, HttpPipeline pipeline, ResourceIdentifier id) : base(clientOptions, credential, uri, pipeline, id)
 {
     _clientDiagnostics = new ClientDiagnostics(ClientOptions);
     _serverAutomaticTuningRestClient = new ServerAutomaticTuningRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal ServerAutomaticTuning(ArmResource options, ResourceIdentifier id) : base(options, id)
 {
     Parent             = options;
     _clientDiagnostics = new ClientDiagnostics(ClientOptions);
     _serverAutomaticTuningRestClient = new ServerAutomaticTuningRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }