public virtual Response <QuotaRequestDetailsResource> Get(string id, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(id, nameof(id)); using var scope = _quotaRequestDetailsQuotaRequestStatusClientDiagnostics.CreateScope("QuotaRequestDetailsCollection.Get"); scope.Start(); try { var response = _quotaRequestDetailsQuotaRequestStatusRestClient.Get(Id.SubscriptionId, _providerId, _location, id, cancellationToken); if (response.Value == null) { throw new RequestFailedException(response.GetRawResponse()); } return(Response.FromValue(new QuotaRequestDetailsResource(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Response <QuotaRequestDetailsResource> Get(CancellationToken cancellationToken = default) { using var scope = _quotaRequestDetailsQuotaRequestStatusClientDiagnostics.CreateScope("QuotaRequestDetailsResource.Get"); scope.Start(); try { var response = _quotaRequestDetailsQuotaRequestStatusRestClient.Get(Id.SubscriptionId, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) { throw new RequestFailedException(response.GetRawResponse()); } return(Response.FromValue(new QuotaRequestDetailsResource(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }