Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion discovery-artifact-manager
23 changes: 1 addition & 22 deletions discovery/googleapis/androidenterprise__v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"ownerDomain": "google.com",
"ownerName": "Google",
"protocol": "rest",
"revision": "20241113",
"revision": "20241217",
"rootUrl": "https://androidenterprise.googleapis.com/",
"servicePath": "",
"title": "Google Play EMM API",
Expand Down Expand Up @@ -396,22 +396,6 @@
"enterpriseId"
],
"parameters": {
"deviceType": {
"deprecated": true,
"description": "Deprecated: Use enrollment_token instead. this field will be removed in the future.",
"enum": [
"unknown",
"dedicatedDevice",
"knowledgeWorker"
],
"enumDescriptions": [
"This value is unused",
"This device is a dedicated device.",
"This device is required to have an authenticated user."
],
"location": "query",
"type": "string"
},
"enrollmentToken.duration": {
"description": "[Optional] The length of time the enrollment token is valid, ranging from 1 minute to [`Durations.MAX_VALUE`](https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/Durations.html#MAX_VALUE), approximately 10,000 years. If not specified, the default duration is 1 hour.",
"format": "google-duration",
Expand Down Expand Up @@ -3182,11 +3166,6 @@
"id": "CreateEnrollmentTokenResponse",
"properties": {
"enrollmentToken": {
"deprecated": true,
"description": "Deprecated: Use token instead. This field will be removed in the future.",
"type": "string"
},
"token": {
"$ref": "EnrollmentToken",
"description": "[Required] The created enrollment token."
}
Expand Down
29 changes: 4 additions & 25 deletions generated/googleapis/lib/androidenterprise/v1.dart
Original file line number Diff line number Diff line change
Expand Up @@ -504,14 +504,6 @@ class EnterprisesResource {
///
/// [enterpriseId] - Required. The ID of the enterprise.
///
/// [deviceType] - Deprecated: Use enrollment_token instead. this field will
/// be removed in the future.
/// Possible string values are:
/// - "unknown" : This value is unused
/// - "dedicatedDevice" : This device is a dedicated device.
/// - "knowledgeWorker" : This device is required to have an authenticated
/// user.
///
/// [enrollmentToken_duration] - \[Optional\] The length of time the
/// enrollment token is valid, ranging from 1 minute to
/// \[`Durations.MAX_VALUE`\](https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/Durations.html#MAX_VALUE),
Expand Down Expand Up @@ -541,14 +533,12 @@ class EnterprisesResource {
/// this method will complete with the same error.
async.Future<CreateEnrollmentTokenResponse> createEnrollmentToken(
core.String enterpriseId, {
core.String? deviceType,
core.String? enrollmentToken_duration,
core.String? enrollmentToken_enrollmentTokenType,
core.String? enrollmentToken_token,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (deviceType != null) 'deviceType': [deviceType],
if (enrollmentToken_duration != null)
'enrollmentToken.duration': [enrollmentToken_duration],
if (enrollmentToken_enrollmentTokenType != null)
Expand Down Expand Up @@ -4559,36 +4549,25 @@ class ConfigurationVariables {

/// Response message for create enrollment token.
class CreateEnrollmentTokenResponse {
/// Deprecated: Use token instead.
///
/// This field will be removed in the future.
@core.Deprecated(
'Not supported. Member documentation may have more information.',
)
core.String? enrollmentToken;

/// The created enrollment token.
///
/// Required.
EnrollmentToken? token;
EnrollmentToken? enrollmentToken;

CreateEnrollmentTokenResponse({
this.enrollmentToken,
this.token,
});

CreateEnrollmentTokenResponse.fromJson(core.Map json_)
: this(
enrollmentToken: json_['enrollmentToken'] as core.String?,
token: json_.containsKey('token')
? EnrollmentToken.fromJson(
json_['token'] as core.Map<core.String, core.dynamic>)
enrollmentToken: json_.containsKey('enrollmentToken')
? EnrollmentToken.fromJson(json_['enrollmentToken']
as core.Map<core.String, core.dynamic>)
: null,
);

core.Map<core.String, core.dynamic> toJson() => {
if (enrollmentToken != null) 'enrollmentToken': enrollmentToken!,
if (token != null) 'token': token!,
};
}

Expand Down
15 changes: 2 additions & 13 deletions generated/googleapis/test/androidenterprise/v1_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -732,8 +732,7 @@ api.CreateEnrollmentTokenResponse buildCreateEnrollmentTokenResponse() {
final o = api.CreateEnrollmentTokenResponse();
buildCounterCreateEnrollmentTokenResponse++;
if (buildCounterCreateEnrollmentTokenResponse < 3) {
o.enrollmentToken = 'foo';
o.token = buildEnrollmentToken();
o.enrollmentToken = buildEnrollmentToken();
}
buildCounterCreateEnrollmentTokenResponse--;
return o;
Expand All @@ -742,11 +741,7 @@ api.CreateEnrollmentTokenResponse buildCreateEnrollmentTokenResponse() {
void checkCreateEnrollmentTokenResponse(api.CreateEnrollmentTokenResponse o) {
buildCounterCreateEnrollmentTokenResponse++;
if (buildCounterCreateEnrollmentTokenResponse < 3) {
unittest.expect(
o.enrollmentToken!,
unittest.equals('foo'),
);
checkEnrollmentToken(o.token!);
checkEnrollmentToken(o.enrollmentToken!);
}
buildCounterCreateEnrollmentTokenResponse--;
}
Expand Down Expand Up @@ -4874,7 +4869,6 @@ void main() {
final mock = HttpServerMock();
final res = api.AndroidEnterpriseApi(mock).enterprises;
final arg_enterpriseId = 'foo';
final arg_deviceType = 'foo';
final arg_enrollmentToken_duration = 'foo';
final arg_enrollmentToken_enrollmentTokenType = 'foo';
final arg_enrollmentToken_token = 'foo';
Expand Down Expand Up @@ -4924,10 +4918,6 @@ void main() {
);
}
}
unittest.expect(
queryMap['deviceType']!.first,
unittest.equals(arg_deviceType),
);
unittest.expect(
queryMap['enrollmentToken.duration']!.first,
unittest.equals(arg_enrollmentToken_duration),
Expand All @@ -4952,7 +4942,6 @@ void main() {
return async.Future.value(stringResponse(200, h, resp));
}), true);
final response = await res.createEnrollmentToken(arg_enterpriseId,
deviceType: arg_deviceType,
enrollmentToken_duration: arg_enrollmentToken_duration,
enrollmentToken_enrollmentTokenType:
arg_enrollmentToken_enrollmentTokenType,
Expand Down
Loading