create method
Creates the specified filter set for the account with the given account ID.
request
- The metadata request object.
Request parameters:
ownerName
- Name of the owner (bidder or account) of the filter set to
be created. For example: - For a bidder-level filter set for bidder 123:
bidders/123
- For an account-level filter set for the buyer account
representing bidder 123: bidders/123/accounts/123
- For an account-level
filter set for the child seat buyer account 456 whose bidder is 123:
bidders/123/accounts/456
Value must have pattern ^bidders/\[^/\]+$
.
isTransient
- Whether the filter set is transient, or should be
persisted indefinitely. By default, filter sets are not transient. If
transient, it will be available for at least 1 hour after creation.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a FilterSet.
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<FilterSet> create(
FilterSet request,
core.String ownerName, {
core.bool? isTransient,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (isTransient != null) 'isTransient': ['${isTransient}'],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v2beta1/' + core.Uri.encodeFull('$ownerName') + '/filterSets';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return FilterSet.fromJson(response_ as core.Map<core.String, core.dynamic>);
}