setDeveloperStatus method

Future<GoogleProtobufEmpty> setDeveloperStatus(
  1. String name, {
  2. String? action,
  3. String? $fields,
})

Sets the status of a developer.

A developer is active by default. If you set a developer's status to inactive, the API keys assigned to the developer apps are no longer valid even though the API keys are set to approved. Inactive developers can still sign in to the developer portal and create apps; however, any new API keys generated during app creation won't work. To set the status of a developer, set the action query parameter to active or inactive, and the Content-Type header to application/octet-stream. If successful, the API call returns the following HTTP status code: 204 No Content

Request parameters:

name - Required. Name of the developer. Use the following structure in your request: organizations/{org}/developers/{developer_id} Value must have pattern ^organizations/\[^/\]+/developers/\[^/\]+$.

action - Status of the developer. Valid values are active and inactive.

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

Completes with a GoogleProtobufEmpty.

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<GoogleProtobufEmpty> setDeveloperStatus(
  core.String name, {
  core.String? action,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (action != null) 'action': [action],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name');

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