public async virtual Task <Response <ApplicationGatewaySslPredefinedPolicy> > GetAsync(string predefinedPolicyName, CancellationToken cancellationToken = default) { if (predefinedPolicyName == null) { throw new ArgumentNullException(nameof(predefinedPolicyName)); } using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaySslPredefinedPolicyCollection.Get"); scope.Start(); try { var response = await _applicationGatewaysRestClient.GetSslPredefinedPolicyAsync(Id.SubscriptionId, predefinedPolicyName, cancellationToken).ConfigureAwait(false); if (response.Value == null) { throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(response.GetRawResponse()).ConfigureAwait(false); } return(Response.FromValue(new ApplicationGatewaySslPredefinedPolicy(Parent, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }