/// <summary>
        /// Gets the available anti affinity rules for a specific server.
        /// </summary>
        /// <param name="serverId">
        /// The server id.
        /// </param>
        /// <param name="filteringOptions">
        /// The filtering options.
        /// </param>
        /// <returns>
        /// Collection of <see cref="AntiAffinityRuleType"/>.
        /// </returns>
        public async Task <IEnumerable <AntiAffinityRuleType> > GetAntiAffinityRulesForServer(Guid serverId, AntiAffinityRuleListOptions filteringOptions = null)
        {
            var response = await GetAntiAffinityRulesForServerPaginated(serverId, filteringOptions, null);

            return(response.items);
        }
        /// <summary>
        /// Gets the available anti affinity rules for a specific server.
        /// </summary>
        /// <param name="serverId">
        /// The server id.
        /// </param>
        /// <param name="filteringOptions">
        /// The filtering options.
        /// </param>
        /// <param name="pagingOptions">
        /// The paging options.
        /// </param>
        /// <returns>
        /// Collection of <see cref="AntiAffinityRuleType"/>.
        /// </returns>
        public async Task <PagedResponse <AntiAffinityRuleType> > GetAntiAffinityRulesForServerPaginated(Guid serverId, AntiAffinityRuleListOptions filteringOptions = null, IPageableRequest pagingOptions = null)
        {
            var response = await _apiClient.GetAsync <antiAffinityRules>(
                ApiUris.GetMcp2GetAntiAffinityRulesForServer(_apiClient.OrganizationId, serverId),
                pagingOptions,
                filteringOptions);

            return(new PagedResponse <AntiAffinityRuleType>
            {
                items = response.antiAffinityRule,
                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>
        /// Gets the available anti affinity rules for a specific network domain.
        /// </summary>
        /// <param name="networkDomainId">
        /// The network domain id.
        /// </param>
        /// <param name="filteringOptions">
        /// The filtering options.
        /// </param>
        /// <returns>
        /// Collection of <see cref="AntiAffinityRuleType"/>.
        /// </returns>
        public async Task <IEnumerable <AntiAffinityRuleType> > GetAntiAffinityRulesForNetworkDomain(Guid networkDomainId, AntiAffinityRuleListOptions filteringOptions = null)
        {
            var response = await GetAntiAffinityRulesForNetworkDomainPaginated(networkDomainId, filteringOptions, null);

            return(response.items);
        }