Skip to content

Commit

Permalink
feat(admin): update the API
Browse files Browse the repository at this point in the history
#### admin:directory_v1

The following keys were added:
- schemas.ChromeOsDevice.properties.deprovisionReason.description
- schemas.ChromeOsDevice.properties.deprovisionReason.enum
- schemas.ChromeOsDevice.properties.deprovisionReason.enumDescriptions
- schemas.ChromeOsDevice.properties.deprovisionReason.type
- schemas.ChromeOsDevice.properties.lastDeprovisionTimestamp.description
- schemas.ChromeOsDevice.properties.lastDeprovisionTimestamp.type
- schemas.DirectoryChromeosdevicesCommandResult.properties.commandResultPayload.description
- schemas.DirectoryChromeosdevicesCommandResult.properties.commandResultPayload.type

The following keys were changed:
- resources.users.methods.patch.description
- schemas.DirectoryChromeosdevicesCommand.properties.type.enum
- schemas.DirectoryChromeosdevicesCommand.properties.type.enumDescriptions
- schemas.DirectoryChromeosdevicesIssueCommandRequest.properties.commandType.enum
- schemas.DirectoryChromeosdevicesIssueCommandRequest.properties.commandType.enumDescriptions
- schemas.DirectoryChromeosdevicesIssueCommandRequest.properties.payload.description
- schemas.Group.description
  • Loading branch information
yoshi-automation authored and sofisl committed Feb 2, 2023
1 parent f3cc068 commit 374bc14
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 11 deletions.
58 changes: 50 additions & 8 deletions discovery/admin-directory_v1.json
Expand Up @@ -4072,7 +4072,7 @@
]
},
"patch": {
"description": "Updates a user using patch semantics. The update method should be used instead, since it also supports patch semantics and has better performance. This method is unable to clear fields that contain repeated objects (`addresses`, `phones`, etc). Use the update method instead.",
"description": "Updates a user using patch semantics. The update method should be used instead, because it also supports patch semantics and has better performance. If you're mapping an external identity to a Google identity, use the [`update`](https://developers.google.com/admin-sdk/directory/v1/reference/users/update) method instead of the `patch` method. This method is unable to clear fields that contain repeated objects (`addresses`, `phones`, etc). Use the update method instead.",
"flatPath": "admin/directory/v1/users/{userKey}",
"httpMethod": "PATCH",
"id": "directory.users.patch",
Expand Down Expand Up @@ -4630,7 +4630,7 @@
}
}
},
"revision": "20221205",
"revision": "20230131",
"rootUrl": "https://admin.googleapis.com/",
"schemas": {
"Alias": {
Expand Down Expand Up @@ -5340,6 +5340,36 @@
},
"type": "array"
},
"deprovisionReason": {
"description": "(Read-only) Deprovision reason.",
"enum": [
"deprovisionReasonUnspecified",
"deprovisionReasonSameModelReplacement",
"deprovisionReasonUpgrade",
"deprovisionReasonDomainMove",
"deprovisionReasonServiceExpiration",
"deprovisionReasonOther",
"deprovisionReasonDifferentModelReplacement",
"deprovisionReasonRetiringDevice",
"deprovisionReasonUpgradeTransfer",
"deprovisionReasonNotRequired",
"deprovisionReasonRepairCenter"
],
"enumDescriptions": [
"The deprovision reason is unknown.",
"The device was replaced by a device with the same model.",
"The device was upgraded.",
"The device's domain was changed.",
"Service expired for the device.",
"The device was deprovisioned for a legacy reason that is no longer supported.",
"The device was replaced by a device with a different model.",
"The device was retired.",
"The device's perpetual upgrade was transferred to a new device.",
"A reason was not required. For example, the licenses were returned to the customer's license pool.",
"The device was deprovisioned by a repair service center."
],
"type": "string"
},
"deviceFiles": {
"description": "A list of device files to download (Read-only)",
"items": {
Expand Down Expand Up @@ -5431,6 +5461,10 @@
"description": "The type of resource. For the Chromeosdevices resource, the value is `admin#directory#chromeosdevice`.",
"type": "string"
},
"lastDeprovisionTimestamp": {
"description": "(Read-only) Date and time for the last deprovision of the device.",
"type": "string"
},
"lastEnrollmentTime": {
"description": "Date and time the device was last enrolled (Read-only)",
"format": "date-time",
Expand Down Expand Up @@ -5860,15 +5894,17 @@
"TAKE_A_SCREENSHOT",
"SET_VOLUME",
"WIPE_USERS",
"REMOTE_POWERWASH"
"REMOTE_POWERWASH",
"DEVICE_START_CRD_SESSION"
],
"enumDescriptions": [
"The command type was unspecified.",
"Reboot the device. Can only be issued to Kiosk and managed guest session devices.",
"Take a screenshot of the device. Only available if the device is in Kiosk Mode.",
"Set the volume of the device. Can only be issued to Kiosk and managed guest session devices.",
"Wipe all the users off of the device. Executing this command in the device will remove all user profile data, but it will keep device policy and enrollment.",
"Wipes the device by performing a power wash. Executing this command in the device will remove all data including user policies, device policies and enrollment policies. Warning: This will revert the device back to a factory state with no enrollment unless the device is subject to forced or auto enrollment. Use with caution, as this is an irreversible action!"
"Wipes the device by performing a power wash. Executing this command in the device will remove all data including user policies, device policies and enrollment policies. Warning: This will revert the device back to a factory state with no enrollment unless the device is subject to forced or auto enrollment. Use with caution, as this is an irreversible action!",
"Starts a Chrome Remote Desktop session."
],
"type": "string"
}
Expand All @@ -5879,6 +5915,10 @@
"description": "The result of executing a command.",
"id": "DirectoryChromeosdevicesCommandResult",
"properties": {
"commandResultPayload": {
"description": "The payload for the command result. The following commands respond with a payload: * `DEVICE_START_CRD_SESSION`: Payload is a stringified JSON object in the form: { \"url\": url }. The URL provides a link to the Chrome Remote Desktop session.",
"type": "string"
},
"errorMessage": {
"description": "The error message with a short explanation as to why the command failed. Only present if the command failed.",
"type": "string"
Expand Down Expand Up @@ -5919,20 +5959,22 @@
"TAKE_A_SCREENSHOT",
"SET_VOLUME",
"WIPE_USERS",
"REMOTE_POWERWASH"
"REMOTE_POWERWASH",
"DEVICE_START_CRD_SESSION"
],
"enumDescriptions": [
"The command type was unspecified.",
"Reboot the device. Can only be issued to Kiosk and managed guest session devices.",
"Take a screenshot of the device. Only available if the device is in Kiosk Mode.",
"Set the volume of the device. Can only be issued to Kiosk and managed guest session devices.",
"Wipe all the users off of the device. Executing this command in the device will remove all user profile data, but it will keep device policy and enrollment.",
"Wipes the device by performing a power wash. Executing this command in the device will remove all data including user policies, device policies and enrollment policies. Warning: This will revert the device back to a factory state with no enrollment unless the device is subject to forced or auto enrollment. Use with caution, as this is an irreversible action!"
"Wipes the device by performing a power wash. Executing this command in the device will remove all data including user policies, device policies and enrollment policies. Warning: This will revert the device back to a factory state with no enrollment unless the device is subject to forced or auto enrollment. Use with caution, as this is an irreversible action!",
"Starts a Chrome Remote Desktop session."
],
"type": "string"
},
"payload": {
"description": "The payload for the command, provide it only if command supports it. The following commands support adding payload: - SET_VOLUME: Payload is a stringified JSON object in the form: { \"volume\": 50 }. The volume has to be an integer in the range [0,100].",
"description": "The payload for the command, provide it only if command supports it. The following commands support adding payload: * `SET_VOLUME`: Payload is a stringified JSON object in the form: { \"volume\": 50 }. The volume has to be an integer in the range [0,100]. * `DEVICE_START_CRD_SESSION`: Payload is optionally a stringified JSON object in the form: { \"ackedUserPresence\": true }. `ackedUserPresence` is a boolean. By default, `ackedUserPresence` is set to `false`. To start a Chrome Remote Desktop session for an active device, set `ackedUserPresence` to `true`.",
"type": "string"
}
},
Expand Down Expand Up @@ -6221,7 +6263,7 @@
"type": "object"
},
"Group": {
"description": "Google Groups provide your users the ability to send messages to groups of people using the group's email address. For more information about common tasks, see the [Developer's Guide](/admin-sdk/directory/v1/guides/manage-groups).",
"description": "Google Groups provide your users the ability to send messages to groups of people using the group's email address. For more information about common tasks, see the [Developer's Guide](https://developers.google.com/admin-sdk/directory/v1/guides/manage-groups). For information about other types of groups, see the [Cloud Identity Groups API documentation](https://cloud.google.com/identity/docs/groups). Note: The user calling the API (or being impersonated by a service account) must have an assigned [role](https://developers.google.com/admin-sdk/directory/v1/guides/manage-roles) that includes Admin API Groups permissions, such as Super Admin or Groups Admin.",
"id": "Group",
"properties": {
"adminCreated": {
Expand Down
28 changes: 25 additions & 3 deletions src/apis/admin/directory_v1.ts
Expand Up @@ -611,6 +611,10 @@ export namespace admin_directory_v1 {
cpuUtilizationPercentageInfo?: number[];
reportTime?: string;
}> | null;
/**
* (Read-only) Deprovision reason.
*/
deprovisionReason?: string | null;
/**
* A list of device files to download (Read-only)
*/
Expand Down Expand Up @@ -662,6 +666,10 @@ export namespace admin_directory_v1 {
* The type of resource. For the Chromeosdevices resource, the value is `admin#directory#chromeosdevice`.
*/
kind?: string | null;
/**
* (Read-only) Date and time for the last deprovision of the device.
*/
lastDeprovisionTimestamp?: string | null;
/**
* Date and time the device was last enrolled (Read-only)
*/
Expand Down Expand Up @@ -949,6 +957,10 @@ export namespace admin_directory_v1 {
* The result of executing a command.
*/
export interface Schema$DirectoryChromeosdevicesCommandResult {
/**
* The payload for the command result. The following commands respond with a payload: * `DEVICE_START_CRD_SESSION`: Payload is a stringified JSON object in the form: { "url": url \}. The URL provides a link to the Chrome Remote Desktop session.
*/
commandResultPayload?: string | null;
/**
* The error message with a short explanation as to why the command failed. Only present if the command failed.
*/
Expand All @@ -971,7 +983,7 @@ export namespace admin_directory_v1 {
*/
commandType?: string | null;
/**
* The payload for the command, provide it only if command supports it. The following commands support adding payload: - SET_VOLUME: Payload is a stringified JSON object in the form: { "volume": 50 \}. The volume has to be an integer in the range [0,100].
* The payload for the command, provide it only if command supports it. The following commands support adding payload: * `SET_VOLUME`: Payload is a stringified JSON object in the form: { "volume": 50 \}. The volume has to be an integer in the range [0,100]. * `DEVICE_START_CRD_SESSION`: Payload is optionally a stringified JSON object in the form: { "ackedUserPresence": true \}. `ackedUserPresence` is a boolean. By default, `ackedUserPresence` is set to `false`. To start a Chrome Remote Desktop session for an active device, set `ackedUserPresence` to `true`.
*/
payload?: string | null;
}
Expand Down Expand Up @@ -1147,7 +1159,7 @@ export namespace admin_directory_v1 {
nextPageToken?: string | null;
}
/**
* Google Groups provide your users the ability to send messages to groups of people using the group's email address. For more information about common tasks, see the [Developer's Guide](/admin-sdk/directory/v1/guides/manage-groups).
* Google Groups provide your users the ability to send messages to groups of people using the group's email address. For more information about common tasks, see the [Developer's Guide](https://developers.google.com/admin-sdk/directory/v1/guides/manage-groups). For information about other types of groups, see the [Cloud Identity Groups API documentation](https://cloud.google.com/identity/docs/groups). Note: The user calling the API (or being impersonated by a service account) must have an assigned [role](https://developers.google.com/admin-sdk/directory/v1/guides/manage-roles) that includes Admin API Groups permissions, such as Super Admin or Groups Admin.
*/
export interface Schema$Group {
/**
Expand Down Expand Up @@ -3511,6 +3523,7 @@ export namespace admin_directory_v1 {
* // "bootMode": "my_bootMode",
* // "cpuInfo": [],
* // "cpuStatusReports": [],
* // "deprovisionReason": "my_deprovisionReason",
* // "deviceFiles": [],
* // "deviceId": "my_deviceId",
* // "diskVolumeReports": [],
Expand All @@ -3521,6 +3534,7 @@ export namespace admin_directory_v1 {
* // "firmwareVersion": "my_firmwareVersion",
* // "firstEnrollmentTime": "my_firstEnrollmentTime",
* // "kind": "my_kind",
* // "lastDeprovisionTimestamp": "my_lastDeprovisionTimestamp",
* // "lastEnrollmentTime": "my_lastEnrollmentTime",
* // "lastKnownNetwork": [],
* // "lastSync": "my_lastSync",
Expand Down Expand Up @@ -3967,6 +3981,7 @@ export namespace admin_directory_v1 {
* // "bootMode": "my_bootMode",
* // "cpuInfo": [],
* // "cpuStatusReports": [],
* // "deprovisionReason": "my_deprovisionReason",
* // "deviceFiles": [],
* // "deviceId": "my_deviceId",
* // "diskVolumeReports": [],
Expand All @@ -3977,6 +3992,7 @@ export namespace admin_directory_v1 {
* // "firmwareVersion": "my_firmwareVersion",
* // "firstEnrollmentTime": "my_firstEnrollmentTime",
* // "kind": "my_kind",
* // "lastDeprovisionTimestamp": "my_lastDeprovisionTimestamp",
* // "lastEnrollmentTime": "my_lastEnrollmentTime",
* // "lastKnownNetwork": [],
* // "lastSync": "my_lastSync",
Expand Down Expand Up @@ -4015,6 +4031,7 @@ export namespace admin_directory_v1 {
* // "bootMode": "my_bootMode",
* // "cpuInfo": [],
* // "cpuStatusReports": [],
* // "deprovisionReason": "my_deprovisionReason",
* // "deviceFiles": [],
* // "deviceId": "my_deviceId",
* // "diskVolumeReports": [],
Expand All @@ -4025,6 +4042,7 @@ export namespace admin_directory_v1 {
* // "firmwareVersion": "my_firmwareVersion",
* // "firstEnrollmentTime": "my_firstEnrollmentTime",
* // "kind": "my_kind",
* // "lastDeprovisionTimestamp": "my_lastDeprovisionTimestamp",
* // "lastEnrollmentTime": "my_lastEnrollmentTime",
* // "lastKnownNetwork": [],
* // "lastSync": "my_lastSync",
Expand Down Expand Up @@ -4188,6 +4206,7 @@ export namespace admin_directory_v1 {
* // "bootMode": "my_bootMode",
* // "cpuInfo": [],
* // "cpuStatusReports": [],
* // "deprovisionReason": "my_deprovisionReason",
* // "deviceFiles": [],
* // "deviceId": "my_deviceId",
* // "diskVolumeReports": [],
Expand All @@ -4198,6 +4217,7 @@ export namespace admin_directory_v1 {
* // "firmwareVersion": "my_firmwareVersion",
* // "firstEnrollmentTime": "my_firstEnrollmentTime",
* // "kind": "my_kind",
* // "lastDeprovisionTimestamp": "my_lastDeprovisionTimestamp",
* // "lastEnrollmentTime": "my_lastEnrollmentTime",
* // "lastKnownNetwork": [],
* // "lastSync": "my_lastSync",
Expand Down Expand Up @@ -4236,6 +4256,7 @@ export namespace admin_directory_v1 {
* // "bootMode": "my_bootMode",
* // "cpuInfo": [],
* // "cpuStatusReports": [],
* // "deprovisionReason": "my_deprovisionReason",
* // "deviceFiles": [],
* // "deviceId": "my_deviceId",
* // "diskVolumeReports": [],
Expand All @@ -4246,6 +4267,7 @@ export namespace admin_directory_v1 {
* // "firmwareVersion": "my_firmwareVersion",
* // "firstEnrollmentTime": "my_firstEnrollmentTime",
* // "kind": "my_kind",
* // "lastDeprovisionTimestamp": "my_lastDeprovisionTimestamp",
* // "lastEnrollmentTime": "my_lastEnrollmentTime",
* // "lastKnownNetwork": [],
* // "lastSync": "my_lastSync",
Expand Down Expand Up @@ -20118,7 +20140,7 @@ export namespace admin_directory_v1 {
}

/**
* Updates a user using patch semantics. The update method should be used instead, since it also supports patch semantics and has better performance. This method is unable to clear fields that contain repeated objects (`addresses`, `phones`, etc). Use the update method instead.
* Updates a user using patch semantics. The update method should be used instead, because it also supports patch semantics and has better performance. If you're mapping an external identity to a Google identity, use the [`update`](https://developers.google.com/admin-sdk/directory/v1/reference/users/update) method instead of the `patch` method. This method is unable to clear fields that contain repeated objects (`addresses`, `phones`, etc). Use the update method instead.
* @example
* ```js
* // Before running the sample:
Expand Down

0 comments on commit 374bc14

Please sign in to comment.