/// <summary> /// Retrieves default health monitors. /// </summary> /// <param name="networkDomainId">The network domain id</param> /// <param name="options">The filter options</param> /// <param name="pagingOptions">The paging options</param> /// <returns>The async task of <see cref="PagedResponse{DefaultHealthMonitorType}"/></returns> public async Task <PagedResponse <DefaultHealthMonitorType> > GetDefaultHealthMonitorsPaginated(Guid networkDomainId, DefaultHealthMonitorListOptions options = null, PageableRequest pagingOptions = null) { var response = await _api.GetAsync <defaultHealthMonitors>(ApiUris.GetDefaultHealthMonitors(_api.OrganizationId, networkDomainId), pagingOptions, options); return(new PagedResponse <DefaultHealthMonitorType> { items = response.defaultHealthMonitor, totalCount = response.totalCountSpecified ? response.totalCount : (int?)null, pageCount = response.pageCountSpecified ? response.pageCount : (int?)null, pageNumber = response.pageNumberSpecified ? response.pageNumber : (int?)null, pageSize = response.pageSizeSpecified ? response.pageSize : (int?)null }); }
/// <summary> /// Retrieves default health monitors. /// </summary> /// <param name="networkDomainId">The network domain id</param> /// <param name="options">The filter options</param> /// <returns>The async task of collection of <see cref="DefaultHealthMonitorType"/></returns> public async Task <IEnumerable <DefaultHealthMonitorType> > GetDefaultHealthMonitors(Guid networkDomainId, DefaultHealthMonitorListOptions options = null) { var response = await GetDefaultHealthMonitorsPaginated(networkDomainId, options, null); return(response.items); }