src/V1/Gapic/ResourceSettingsServiceGapicClient.php
/**
     * Lists all the settings that are available on the Cloud resource `parent`.
     *
     * Sample code:
     * ```
     * $resourceSettingsServiceClient = new ResourceSettingsServiceClient();
     * try {
     *     $parent = 'parent';
     *     // Iterate over pages of elements
     *     $pagedResponse = $resourceSettingsServiceClient->listSettings($parent);
     *     foreach ($pagedResponse->iteratePages() as $page) {
     *         foreach ($page as $element) {
     *             // doSomethingWith($element);
     *         }
     *     }
     *     // Alternatively:
     *     // Iterate through all elements
     *     $pagedResponse = $resourceSettingsServiceClient->listSettings($parent);
     *     foreach ($pagedResponse->iterateAllElements() as $element) {
     *         // doSomethingWith($element);
     *     }
     * } finally {
     *     $resourceSettingsServiceClient->close();
     * }
     * ```
     *
     * @param string $parent       Required. The Cloud resource that parents the setting. Must be in one of the
     *                             following forms:
     *
     *                             * `projects/{project_number}`
     *                             * `projects/{project_id}`
     *                             * `folders/{folder_id}`
     *                             * `organizations/{organization_id}`
     * @param array  $optionalArgs {
     *     Optional.
     *
     *     @type int $pageSize
     *           The maximum number of resources contained in the underlying API
     *           response. The API may return fewer values in a page, even if
     *           there are additional values to be retrieved.
     *     @type string $pageToken
     *           A page token is used to specify a page of values to be returned.
     *           If no page token is specified (the default), the first page
     *           of values will be returned. Any page token used here must have
     *           been generated by a previous call to the API.
     *     @type int $view
     *           The SettingView for this request.
     *           For allowed values, use constants defined on {@see \Google\Cloud\ResourceSettings\V1\SettingView}
     *     @type RetrySettings|array $retrySettings
     *           Retry settings to use for this call. Can be a
     *           {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
     *           settings parameters. See the documentation on
     *           {@see Google\ApiCore\RetrySettings} for example usage.
     * }
     *
     * @return \Google\ApiCore\PagedListResponse
     *
     * @throws ApiException if the remote call fails
     */
Lists all the settings that are available on the Cloud resource `parent`.

@param string $parent       Required. The Cloud resource that parents the setting. Must be in one of the
following forms.



@type int $pageSize
The maximum number of resources contained in the underlying API
response. The API may return fewer values in a page, even if
there are additional values to be retrieved.
@type string $pageToken
A page token is used to specify a page of values to be returned.
If no page token is specified (the default), the first page
of values will be returned. Any page token used here must have
been generated by a previous call to the API.
@type int $view
The SettingView for this request.



@throws ApiException if the remote call fails
Lists all the settings that are available on the Cloud resource ` parent ` . @param string $parent Required . The Cloud resource that parents the setting . Must be in one of the following forms . @type int $pageSize The maximum number of resources contained in the underlying API response . The API may return fewer values in a page even if there are additional values to be retrieved . @type string $pageToken A page token is used to specify a page of values to be returned . If no page token is specified ( the default ) the first page of values will be returned . Any page token used here must have been generated by a previous call to the API . @type int $view The SettingView for this request . @throws ApiException if the remote call fails
public function listSettings($parent, array $optionalArgs = [])
    {
        $request = new ListSettingsRequest();
        $requestParamHeaders = [];
        $request->setParent($parent);
        $requestParamHeaders['parent'] = $parent;
        if (isset($optionalArgs['pageSize'])) {
            $request->setPageSize($optionalArgs['pageSize']);
        }
        if (isset($optionalArgs['pageToken'])) {
            $request->setPageToken($optionalArgs['pageToken']);
        }
        if (isset($optionalArgs['view'])) {
            $request->setView($optionalArgs['view']);
        }
        $requestParams = new RequestParamsHeaderDescriptor(
            $requestParamHeaders
        );
        $optionalArgs['headers'] = isset($optionalArgs['headers'])
            ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
            : $requestParams->getHeader();
        return $this->getPagedListResponse(
            'ListSettings',
            $optionalArgs,
            ListSettingsResponse::class,
            $request
        );
    }
public function listSettings ( $ parent , array $ optionalArgs = [ ] ) { $ request = new ListSettingsRequest ( ) ; $ requestParamHeaders = [ ] ; $ request -> setParent ( $ parent ) ; $ requestParamHeaders [ 'parent' ] = $ parent ; if ( isset ( $ optionalArgs [ 'pageSize' ] ) ) { $ request -> setPageSize ( $ optionalArgs [ 'pageSize' ] ) ; } if ( isset ( $ optionalArgs [ 'pageToken' ] ) ) { $ request -> setPageToken ( $ optionalArgs [ 'pageToken' ] ) ; } if ( isset ( $ optionalArgs [ 'view' ] ) ) { $ request -> setView ( $ optionalArgs [ 'view' ] ) ; } $ requestParams = new RequestParamsHeaderDescriptor ( $ requestParamHeaders ) ; $ optionalArgs [ 'headers' ] = isset ( $ optionalArgs [ 'headers' ] ) ? array_merge ( $ requestParams -> getHeader ( ) , $ optionalArgs [ 'headers' ] ) : $ requestParams -> getHeader ( ) ; return $ this -> getPagedListResponse ( 'ListSettings' , $ optionalArgs , ListSettingsResponse :: class , $ request ) ; }
Lists all the settings that are available on the Cloud resource `parent`.
Lists all the settings that are available on the Cloud resource ` parent ` .