countDevicesPerReleaseChannel method

Future<GoogleChromeManagementV1CountDevicesPerReleaseChannelResponse> countDevicesPerReleaseChannel(
  1. String customer, {
  2. int? date_day,
  3. int? date_month,
  4. int? date_year,
  5. String? $fields,
})

Get a count of devices per channel.

Request parameters:

customer - Required. Obfuscated customer ID prefixed with "customers/C" or "customers/my_customer". Value must have pattern ^customers/\[^/\]+$.

date_day - Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

date_month - Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

date_year - Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

$fields - Selector specifying which fields to include in a partial response.

Completes with a GoogleChromeManagementV1CountDevicesPerReleaseChannelResponse.

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<GoogleChromeManagementV1CountDevicesPerReleaseChannelResponse>
countDevicesPerReleaseChannel(
  core.String customer, {
  core.int? date_day,
  core.int? date_month,
  core.int? date_year,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'date.day': ?date_day == null ? null : ['${date_day}'],
    'date.month': ?date_month == null ? null : ['${date_month}'],
    'date.year': ?date_year == null ? null : ['${date_year}'],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ =
      'v1/' +
      core.Uri.encodeFull('$customer') +
      '/reports:countDevicesPerReleaseChannel';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return GoogleChromeManagementV1CountDevicesPerReleaseChannelResponse.fromJson(
    response_ as core.Map<core.String, core.dynamic>,
  );
}