public PagedList<PolicySetDefinitionInner> listByManagementGroup(final String managementGroupId) {
        ServiceResponse<Page<PolicySetDefinitionInner>> response = listByManagementGroupSinglePageAsync(managementGroupId).toBlocking().single();
        return new PagedList<PolicySetDefinitionInner>(response.body()) {
            @Override
            public Page<PolicySetDefinitionInner> nextPage(String nextPageLink) {
                return listByManagementGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
            }
        };
    }
public PagedList < PolicySetDefinitionInner > listByManagementGroup ( final String managementGroupId ) { ServiceResponse < Page < PolicySetDefinitionInner > > response = listByManagementGroupSinglePageAsync ( managementGroupId ) . toBlocking ( ) . single ( ) ; return new PagedList < PolicySetDefinitionInner > ( response . body ( ) ) { @ Override public Page < PolicySetDefinitionInner > nextPage ( String nextPageLink ) { return listByManagementGroupNextSinglePageAsync ( nextPageLink ) . toBlocking ( ) . single ( ) . body ( ) ; } } ; }
Retrieves all policy set definitions in management group.
This operation retrieves a list of all the a policy set definition in the given management group.

@param managementGroupId The ID of the management group.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws ErrorResponseException thrown if the request is rejected by server
@throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
@return the PagedList&lt;PolicySetDefinitionInner&gt; object if successful.