internal GeoBackupPolicy(ArmResource options, GeoBackupPolicyData resource) : base(options, resource.Id)
 {
     HasData                      = true;
     _data                        = resource;
     _clientDiagnostics           = new ClientDiagnostics(ClientOptions);
     _geoBackupPoliciesRestClient = new GeoBackupPoliciesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
        internal GeoBackupPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id)
        {
            _geoBackupPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ResourceType.Namespace, Diagnostics);
            TryGetApiVersion(ResourceType, out string geoBackupPolicyApiVersion);
            _geoBackupPolicyRestClient = new GeoBackupPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, geoBackupPolicyApiVersion);
#if DEBUG
            ValidateResourceId(Id);
#endif
        }
        internal GeoBackupPolicyCollection(ArmResource parent) : base(parent)
        {
            _geoBackupPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", GeoBackupPolicy.ResourceType.Namespace, DiagnosticOptions);
            ArmClient.TryGetApiVersion(GeoBackupPolicy.ResourceType, out string geoBackupPolicyApiVersion);
            _geoBackupPolicyRestClient = new GeoBackupPoliciesRestOperations(_geoBackupPolicyClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, geoBackupPolicyApiVersion);
#if DEBUG
            ValidateResourceId(Id);
#endif
        }
Exemplo n.º 4
0
 internal GeoBackupPolicyCollection(ArmResource parent) : base(parent)
 {
     _clientDiagnostics           = new ClientDiagnostics(ClientOptions);
     _geoBackupPoliciesRestClient = new GeoBackupPoliciesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal GeoBackupPoliciesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null)
 {
     RestClient         = new GeoBackupPoliciesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
     _clientDiagnostics = clientDiagnostics;
     _pipeline          = pipeline;
 }
 internal GeoBackupPolicy(ArmClientOptions clientOptions, TokenCredential credential, Uri uri, HttpPipeline pipeline, ResourceIdentifier id) : base(clientOptions, credential, uri, pipeline, id)
 {
     _clientDiagnostics           = new ClientDiagnostics(ClientOptions);
     _geoBackupPoliciesRestClient = new GeoBackupPoliciesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
 internal GeoBackupPolicy(ArmResource options, ResourceIdentifier id) : base(options, id)
 {
     _clientDiagnostics           = new ClientDiagnostics(ClientOptions);
     _geoBackupPoliciesRestClient = new GeoBackupPoliciesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }