code: public PagedList<SecurityRuleInner> list(final String resourceGroupName, final String networkSecurityGroupName) {
          ServiceResponse<Page<SecurityRuleInner>> response = listSinglePageAsync(resourceGroupName, networkSecurityGroupName).toBlocking().single();
          return new PagedList<SecurityRuleInner>(response.body()) {
              @Override
              public Page<SecurityRuleInner> nextPage(String nextPageLink) {
                  return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
              }
          };
      }
docs: Gets all security rules in a network security group.
  
  @param resourceGroupName The name of the resource group.
  @param networkSecurityGroupName The name of the network security group.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws CloudException 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;SecurityRuleInner&gt; object if successful.