@param \Riak\Client\Core\Message\Kv\ListKeysRequest $request

@return \Riak\Client\ProtoBuf\RpbGetReq
349749
private function createRpbMessage(ListKeysRequest $request)
    {
        $message = new RpbListKeysReq();

        $message->setTimeout($request->timeout);
        $message->setBucket($request->bucket);
        $message->setType($request->type);

        return $message;
    }
480335
public function toResponse($request)
    {
        return (
            $this->resource instanceof AbstractPaginator
                ? new PaginatedResourceResponse($this)
                : new ResourceResponse($this)
        )->toResponse($request);
    }
1345415
public function listGroup(ListGroupRequest $request)
    {
        $response = new ListGroupResponse();
        return $this->client->sendRequest($request, $response);
    }
350717
private function createRpbMessage(PutRequest $request)
    {
        $rpbPutReq = new RpbSetBucketReq();
        $rpbProps  = new RpbBucketProps();

        $rpbProps->r               = $this->encodeQuorum($request->r);
        $rpbProps->w               = $this->encodeQuorum($request->w);
        $rpbProps->dw              = $this->encodeQuorum($request->dw);
        $rpbProps->rw              = $this->encodeQuorum($request->rw);
        $rpbProps->pr              = $this->encodeQuorum($request->pr);
        $rpbProps->pw              = $this->encodeQuorum($request->pw);
        $rpbProps->n_val           = $request->nVal;
        $rpbProps->allow_mult      = $request->allowMult;
        $rpbProps->last_write_wins = $request->lastWriteWins;
        $rpbProps->old_vclock      = $request->oldVclock;
        $rpbProps->young_vclock    = $request->youngVclock;
        $rpbProps->big_vclock      = $request->bigVclock;
        $rpbProps->small_vclock    = $request->smallVclock;
        $rpbProps->basic_quorum    = $request->basicQuorum;
        $rpbProps->notfound_ok     = $request->notfoundOk;
        $rpbProps->backend         = $request->backend;
        $rpbProps->search          = $request->search;
        $rpbProps->search_index    = $request->searchIndex;
        $rpbProps->datatype        = $request->datatype;
        $rpbProps->consistent      = $request->consistent;

        if ($request->linkwalkFunction) {
            $rpbProps->setLinkfun($this->createRpbModFun($request->linkwalkFunction));
        }

        if ($request->chashKeyFunction) {
            $rpbProps->setChashKeyfun($this->createRpbModFun($request->chashKeyFunction));
        }

        foreach ($request->precommitHooks as $hook) {
            $rpbProps->addPrecommit($this->createRpbCommitHook($hook));
        }

        foreach ($request->postcommitHooks as $hook) {
            $rpbProps->addPostcommit($this->createRpbCommitHook($hook));
        }

        $rpbPutReq->setBucket($request->bucket);
        $rpbPutReq->setType($request->type);
        $rpbPutReq->setProps($rpbProps);

        return $rpbPutReq;
    }
582469
public function getListPaginate(HCResourceGrabPropertyRequest $request): JsonResponse
   {
       return response()->json(
           $this->service->getRepository()->getListPaginate($request)
       );
   }
1089263
public function listAction(Request $request): Response
    {
        $page = $request->query->get('page', 1);

        $pagerfanta = new Pagerfanta(
            new BookmarkAdapter($this->bookmarkService, $this->datasetFactory)
        );

        $pagerfanta->setMaxPerPage($this->defaultPaginationLimit);
        $pagerfanta->setCurrentPage(min($page, $pagerfanta->getNbPages()));

        $editForm = $this->formFactory->contentEdit(
            new ContentEditData()
        );

        $removeBookmarkForm = $this->formFactory->removeBookmark(
            new BookmarkRemoveData($this->getChoices($pagerfanta->getCurrentPageResults()))
        );

        return $this->render(
            '@ezdesign/admin/bookmark/list.html.twig',
            $viewParameters = [
                'pager' => $pagerfanta,
                'form_edit' => $editForm->createView(),
                'form_remove' => $removeBookmarkForm->createView(),
            ]
        );
    }
429496
public function send(Request $request)
    {
        $response   = new PutSchemaResponse();
        $rpbPutReq  = $this->createRpbMessage($request);

        $this->client->send($rpbPutReq, RiakMessageCodes::YOKOZUNA_SCHEMA_PUT_REQ, RiakMessageCodes::PUT_RESP);

        return $response;
    }
901451
public function listLogStores(ListLogStoresRequest $request)
    {
        $headers  = array();
        $params   = array();
        $resource = '/logstores';
        $project  = $request->getProject() !== null ? $request->getProject() : '';
        list ( $resp, $header ) = $this->send("GET", $project, null, $resource, $params, $headers);
        $requestId = isset ( $header ['x-log-requestid'] ) ? $header ['x-log-requestid'] : '';
        $resp      = $this->parseToJson($resp, $requestId);

        return new ListLogStoresResponse ($resp, $header);
    }
287310
public function listAction(Request $request)
    {
        $this->denyAccessUnlessGranted(ContributionActionInterface::READ, KeywordInterface::ENTITY_TYPE);
        $mapping = array(
            'label' => 'label'
        );
        $configuration = PaginateFinderConfiguration::generateFromRequest($request, $mapping);
        $repository = $this->get('open_orchestra_model.repository.keyword');
        $collection = $repository->findForPaginate($configuration);
        $recordsTotal = $repository->count();
        $recordsFiltered = $repository->countWithFilter($configuration);
        $facade = $this->get('open_orchestra_api.transformer_manager')->transform('keyword_collection', $collection);
        $facade->recordsTotal = $recordsTotal;
        $facade->recordsFiltered = $recordsFiltered;

        return $facade;
    }
987892
public ListVpcsResponse listVpcs(ListVpcsRequest request) {
        checkNotNull(request, "request should not be null.");
        InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, VPC_PREFIX);
        if (request.getMarker() != null) {
            internalRequest.addParameter("marker", request.getMarker());
        }
        if (request.getMaxKeys() > 0) {
            internalRequest.addParameter("maxKeys", String.valueOf(request.getMaxKeys()));
        }
        if (request.getIsDefault() != null) {
            internalRequest.addParameter("isDefault", request.getIsDefault().toString());
        }
        return invokeHttpClient(internalRequest, ListVpcsResponse.class);
    }
643629
private function createRpbMessage(MapReduceRequest $request)
    {
        $rpbMapRedReq = new RpbMapRedReq();

        $rpbMapRedReq->setContentType('application/json');
        $rpbMapRedReq->setRequest($request->request);

        return $rpbMapRedReq;
    }
680775
public function listAction(Request $request)
    {
        $tid = $request->get('tid');
        $language = $request->get('language');
        $version = $request->get('version');
        $incoming = $request->get('incoming', false);

        $treeManager = $this->get('phlexible_tree.tree_manager');
        $elementService = $this->get('phlexible_element.element_service');
        $linkFetcher = $this->get('phlexible_element.link_fetcher');

        $tree = $treeManager->getByNodeId($tid);
        $node = $tree->get($tid);

        $element = $elementService->findElement($node->getTypeId());
        $elementVersion = $elementService->findElementVersion($element, $version);

        return new JsonResponse(['links' => $linkFetcher->fetch($elementVersion, $language, $incoming ? $node : null)]);
    }
905262
public function send(Request $request)
    {
        $response   = new PutResponse();
        $rpbPutReq  = $this->createRpbMessage($request);
        $rpbPutResp = $this->client->send($rpbPutReq, RiakMessageCodes::PUT_REQ, RiakMessageCodes::PUT_RESP);

        if ( ! $rpbPutResp instanceof RpbPutResp) {
            return $response;
        }

        if ( ! $rpbPutResp->hasContent()) {
            return $response;
        }

        if ($rpbPutResp->hasKey()) {
            $response->key = $rpbPutResp->key;
        }

        $response->vClock      = $rpbPutResp->getVclock()->get();
        $response->contentList = $this->createContentList($rpbPutResp->getContentList());

        return $response;
    }
1050295
public function get_items( $request ) {

		// Make sure a search string is set in case the orderby is set to 'relevance'.
		if ( ! empty( $request['orderby'] ) && 'relevance' === $request['orderby'] && empty( $request['search'] ) && empty( $request['filter']['s'] ) ) {
			return new WP_Error( 'rest_no_search_term_defined', __( 'You need to define a search term to order by relevance.' ), array( 'status' => 400 ) );
		}

		// Retrieve the list of registered collection query parameters.
		$registered = $this->get_collection_params();
		$args = array();

		// This array defines mappings between public API query parameters whose
		// values are accepted as-passed, and their internal WP_Query parameter
		// name equivalents (some are the same). Only values which are also
		// present in $registered will be set.
		$parameter_mappings = array(
			'author'         => 'author__in',
			'author_exclude' => 'author__not_in',
			'exclude'        => 'post__not_in',
			'include'        => 'post__in',
			'menu_order'     => 'menu_order',
			'offset'         => 'offset',
			'order'          => 'order',
			'orderby'        => 'orderby',
			'page'           => 'paged',
			'parent'         => 'post_parent__in',
			'parent_exclude' => 'post_parent__not_in',
			'search'         => 's',
			'slug'           => 'name',
			'status'         => 'post_status',
		);

		// For each known parameter which is both registered and present in the request,
		// set the parameter's value on the query $args.
		foreach ( $parameter_mappings as $api_param => $wp_param ) {
			if ( isset( $registered[ $api_param ], $request[ $api_param ] ) ) {
				$args[ $wp_param ] = $request[ $api_param ];
			}
		}

		// Check for & assign any parameters which require special handling or setting.

		$args['date_query'] = array();
		// Set before into date query. Date query must be specified as an array of an array.
		if ( isset( $registered['before'], $request['before'] ) ) {
			$args['date_query'][0]['before'] = $request['before'];
		}

		// Set after into date query. Date query must be specified as an array of an array.
		if ( isset( $registered['after'], $request['after'] ) ) {
			$args['date_query'][0]['after'] = $request['after'];
		}

		if ( isset( $registered['filter'] ) && is_array( $request['filter'] ) ) {
			$args = array_merge( $args, $request['filter'] );
			unset( $args['filter'] );
		}

		// Ensure our per_page parameter overrides any provided posts_per_page filter.
		if ( isset( $registered['per_page'] ) ) {
			$args['posts_per_page'] = $request['per_page'];
		}

		if ( isset( $registered['sticky'], $request['sticky'] ) ) {
			$sticky_posts = get_option( 'sticky_posts', array() );
			if ( $sticky_posts && $request['sticky'] ) {
				// As post__in will be used to only get sticky posts,
				// we have to support the case where post__in was already
				// specified.
				$args['post__in'] = $args['post__in'] ? array_intersect( $sticky_posts, $args['post__in'] ) : $sticky_posts;

				// If we intersected, but there are no post ids in common,
				// WP_Query won't return "no posts" for `post__in = array()`
				// so we have to fake it a bit.
				if ( ! $args['post__in'] ) {
					$args['post__in'] = array( -1 );
				}
			} elseif ( $sticky_posts ) {
				// As post___not_in will be used to only get posts that
				// are not sticky, we have to support the case where post__not_in
				// was already specified.
				$args['post__not_in'] = array_merge( $args['post__not_in'], $sticky_posts );
			}
		}

		// Force the post_type argument, since it's not a user input variable.
		$args['post_type'] = $this->post_type;

		/**
		 * Filter the query arguments for a request.
		 *
		 * Enables adding extra arguments or setting defaults for a post
		 * collection request.
		 *
		 * @see https://developer.wordpress.org/reference/classes/wp_query/
		 *
		 * @param array           $args    Key value array of query var to query value.
		 * @param WP_REST_Request $request The request used.
		 */
		$args = apply_filters( "rest_{$this->post_type}_query", $args, $request );
		$query_args = $this->prepare_items_query( $args, $request );

		$taxonomies = wp_list_filter( get_object_taxonomies( $this->post_type, 'objects' ), array( 'show_in_rest' => true ) );
		foreach ( $taxonomies as $taxonomy ) {
			$base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name;
			$tax_exclude = $base . '_exclude';

			if ( ! empty( $request[ $base ] ) ) {
				$query_args['tax_query'][] = array(
					'taxonomy'         => $taxonomy->name,
					'field'            => 'term_id',
					'terms'            => $request[ $base ],
					'include_children' => false,
				);
			}

			if ( ! empty( $request[ $tax_exclude ] ) ) {
				$query_args['tax_query'][] = array(
					'taxonomy'         => $taxonomy->name,
					'field'            => 'term_id',
					'terms'            => $request[ $tax_exclude ],
					'include_children' => false,
					'operator'         => 'NOT IN',
				);
			}
		}

		$posts_query = new WP_Query();
		$query_result = $posts_query->query( $query_args );

		// Allow access to all password protected posts if the context is edit.
		if ( 'edit' === $request['context'] ) {
			add_filter( 'post_password_required', '__return_false' );
		}

		$posts = array();
		foreach ( $query_result as $post ) {
			if ( ! $this->check_read_permission( $post ) ) {
				continue;
			}

			$data = $this->prepare_item_for_response( $post, $request );
			$posts[] = $this->prepare_response_for_collection( $data );
		}

		// Reset filter.
		if ( 'edit' === $request['context'] ) {
			remove_filter( 'post_password_required', '__return_false' );
		}

		$page = (int) $query_args['paged'];
		$total_posts = $posts_query->found_posts;

		if ( $total_posts < 1 ) {
			// Out-of-bounds, run the query again without LIMIT for total count.
			unset( $query_args['paged'] );
			$count_query = new WP_Query();
			$count_query->query( $query_args );
			$total_posts = $count_query->found_posts;
		}

		$max_pages = ceil( $total_posts / (int) $query_args['posts_per_page'] );

		$response = rest_ensure_response( $posts );
		$response->header( 'X-WP-Total', (int) $total_posts );
		$response->header( 'X-WP-TotalPages', (int) $max_pages );

		$request_params = $request->get_query_params();
		if ( ! empty( $request_params['filter'] ) ) {
			// Normalize the pagination params.
			unset( $request_params['filter']['posts_per_page'], $request_params['filter']['paged'] );
		}
		$base = add_query_arg( $request_params, rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ) );

		if ( $page > 1 ) {
			$prev_page = $page - 1;
			if ( $prev_page > $max_pages ) {
				$prev_page = $max_pages;
			}
			$prev_link = add_query_arg( 'page', $prev_page, $base );
			$response->link_header( 'prev', $prev_link );
		}
		if ( $max_pages > $page ) {
			$next_page = $page + 1;
			$next_link = add_query_arg( 'page', $next_page, $base );
			$response->link_header( 'next', $next_link );
		}

		return $response;
	}
815208
public function orderList(Request $request, SalesChannelContext $context): JsonResponse
    {
        $limit = $request->query->getInt('limit', 10);
        $page = $request->query->getInt('page', 1);

        return new JsonResponse($this->serialize($this->loadOrders($page, $limit, $context)));
    }
386249
public function getAjaxList(Request $request) // GET THE SLUG, ex. 'posts', 'pages', etc.
    {
        // GET THE SLUG, ex. 'posts', 'pages', etc.
        $slug = $request->slug;

        // GET THE DataType based on the slug
        $dataType = Admin::model('DataType')->where('slug', '=', $slug)->first();

        // Check permission
        $this->authorize('browse', app($dataType->model_name));

        $model = app($dataType->model_name);
        $query = $model->select('*');

        if (method_exists($model, 'adminList')) {
            $query = $model->adminList()->select('*');
        }

        if (!isset($request->order)) {
            if ($model->timestamps) {
                $query = $query->latest($model::CREATED_AT);
            } else {
                $relationships = $this->getRelationships($dataType);
                $query = $query->with($relationships)->orderBy($model->getKeyName(), 'DESC');
            }
        }

        $query = DataTables::of($query);

        foreach ($dataType->ajaxList() as $dataRow) {
            $query->editColumn($dataRow->field, function($dataTypeContent) use($request, $slug, $dataRow){
                $content = $dataTypeContent->{$dataRow->field};

                $handler = AbstractHandler::initial($dataRow->type);

                if (method_exists($handler, 'getContentForList')) {
                    $content = $handler->getContentForList($request, $slug, $dataRow, $dataTypeContent);
                }

                return $content;
            });

            if ($dataRow->type == 'relationship') {
                $query->filterColumn($dataRow->field, function ($query, $keyword) use($dataRow){
                    $relationship = json_decode($dataRow->details);
                    $ids = app($relationship->model)->where($relationship->label, 'like', "%$keyword%")->pluck($relationship->key);
                    $query->whereIn($relationship->column, $ids);
                });
            }
        }

        return $query
            ->addColumn('delete_checkbox', function($dataTypeContent) {
                return '<input type="checkbox" name="row_id" id="checkbox_' . $dataTypeContent->id . '" value="' . $dataTypeContent->id . '">';

            })
            ->addColumn('actions', function($dataTypeContent) use($dataType){
                return Admin::view('admin::list.datatable.buttons', ['data' => $dataTypeContent, 'dataType' => $dataType]);
            })
            ->rawColumns(array_merge($dataType->ajaxListFields(), ['delete_checkbox', 'actions']))
            ->make(true);
    }
1358941
public function send(Request $request)
    {
        $response     = new MapReduceResponse();
        $httpRequest  = $this->createHttpRequest($request);
        $httpResponse = $this->client->send($httpRequest);
        $code         = $httpResponse->getStatusCode();

        if ( ! isset($this->validResponseCodes[$code])) {
            throw RiakTransportException::unexpectedStatusCode($code);
        }

        $multipartIterator  = new MultipartResponseIterator($httpResponse);
        $mapReduceIterator  = new HttpMapReduceResponseIterator($multipartIterator);
        $response->iterator = $mapReduceIterator;

        return $response;
    }