code: public Observable<ServiceResponse<Page<PolicyDefinitionInner>>> listByManagementGroupSinglePageAsync(final String managementGroupId) {
          if (managementGroupId == null) {
              throw new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.");
          }
          if (this.client.apiVersion() == null) {
              throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
          }
          return service.listByManagementGroup(managementGroupId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<PolicyDefinitionInner>>>>() {
                  @Override
                  public Observable<ServiceResponse<Page<PolicyDefinitionInner>>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<PageImpl<PolicyDefinitionInner>> result = listByManagementGroupDelegate(response);
                          return Observable.just(new ServiceResponse<Page<PolicyDefinitionInner>>(result.body(), result.response()));
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Gets all the policy definitions for a subscription at management group level.
  
  ServiceResponse<PageImpl<PolicyDefinitionInner>> * @param managementGroupId The ID of the management group.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the PagedList&lt;PolicyDefinitionInner&gt; object wrapped in {@link ServiceResponse} if successful.