internal ServiceObjective(ArmResource options, ServiceObjectiveData resource) : base(options, resource.Id)
 {
     HasData                      = true;
     _data                        = resource;
     _clientDiagnostics           = new ClientDiagnostics(ClientOptions);
     _serviceObjectivesRestClient = new ServiceObjectivesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
        internal ServiceObjectiveCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
        {
            _serviceObjectiveClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ServiceObjectiveResource.ResourceType.Namespace, Diagnostics);
            TryGetApiVersion(ServiceObjectiveResource.ResourceType, out string serviceObjectiveApiVersion);
            _serviceObjectiveRestClient = new ServiceObjectivesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceObjectiveApiVersion);
#if DEBUG
            ValidateResourceId(Id);
#endif
        }
Example #3
0
        internal ServiceObjectiveCollection(ArmResource parent) : base(parent)
        {
            _serviceObjectiveClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ServiceObjective.ResourceType.Namespace, DiagnosticOptions);
            ArmClient.TryGetApiVersion(ServiceObjective.ResourceType, out string serviceObjectiveApiVersion);
            _serviceObjectiveRestClient = new ServiceObjectivesRestOperations(_serviceObjectiveClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, serviceObjectiveApiVersion);
#if DEBUG
            ValidateResourceId(Id);
#endif
        }
 internal ServiceObjective(ArmClientOptions clientOptions, TokenCredential credential, Uri uri, HttpPipeline pipeline, ResourceIdentifier id) : base(clientOptions, credential, uri, pipeline, id)
 {
     _clientDiagnostics           = new ClientDiagnostics(ClientOptions);
     _serviceObjectivesRestClient = new ServiceObjectivesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal ServiceObjective(ArmResource options, ResourceIdentifier id) : base(options, id)
 {
     _clientDiagnostics           = new ClientDiagnostics(ClientOptions);
     _serviceObjectivesRestClient = new ServiceObjectivesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal ServiceObjectiveCollection(ArmResource parent) : base(parent)
 {
     _clientDiagnostics           = new ClientDiagnostics(ClientOptions);
     _serviceObjectivesRestClient = new ServiceObjectivesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal ServiceObjectivesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null)
 {
     RestClient         = new ServiceObjectivesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
     _clientDiagnostics = clientDiagnostics;
     _pipeline          = pipeline;
 }