list method
List ChannelPartnerLinks belonging to a distributor.
You must be a distributor to call this method. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: The list of the distributor account's ChannelPartnerLink resources.
Request parameters:
parent
- Required. The resource name of the reseller account for listing
channel partner links. Parent uses the format: accounts/{account_id}
Value must have pattern ^accounts/\[^/\]+$
.
pageSize
- Optional. Requested page size. Server might return fewer
results than requested. If unspecified, server will pick a default size
(25). The maximum value is 200; the server will coerce values above 200.
pageToken
- Optional. A token for a page of results other than the first
page. Obtained using ListChannelPartnerLinksResponse.next_page_token of
the previous CloudChannelService.ListChannelPartnerLinks call.
view
- Optional. The level of granularity the ChannelPartnerLink will
display.
Possible string values are:
- "UNSPECIFIED" : The default / unset value. The API will default to the BASIC view.
- "BASIC" : Includes all fields except the ChannelPartnerLink.channel_partner_cloud_identity_info.
- "FULL" : Includes all fields.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudChannelV1ListChannelPartnerLinksResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<GoogleCloudChannelV1ListChannelPartnerLinksResponse> list(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ =
'v1/' + core.Uri.encodeFull('$parent') + '/channelPartnerLinks';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleCloudChannelV1ListChannelPartnerLinksResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}