AfdSecurityPolicy IOperationSource <AfdSecurityPolicy> .CreateResult(Response response, CancellationToken cancellationToken)
        {
            using var document = JsonDocument.Parse(response.ContentStream);
            var data = AfdSecurityPolicyData.DeserializeAfdSecurityPolicyData(document.RootElement);

            return(new AfdSecurityPolicy(_client, data));
        }
Esempio n. 2
0
 internal AfdSecurityPolicy(ArmResource options, AfdSecurityPolicyData resource) : base(options, resource.Id)
 {
     HasData                        = true;
     _data                          = resource;
     _clientDiagnostics             = new ClientDiagnostics(ClientOptions);
     _afdSecurityPoliciesRestClient = new AfdSecurityPoliciesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
 }
Esempio n. 3
0
 internal AfdSecurityPolicyResource(ArmClient client, AfdSecurityPolicyData data) : this(client, data.Id)
 {
     HasData = true;
     _data   = data;
 }