From 522e74b34eb2472cdc54460c0bce68806c49d0f1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Tue, 1 Nov 2022 07:09:39 +0000 Subject: [PATCH] feat(drivelabels): update the api #### drivelabels:v2beta The following keys were deleted: - resources.labels.resources.permissions.methods.batchDelete.parameters.labelsId (Total Keys: 3) - resources.labels.resources.permissions.methods.patch (Total Keys: 13) The following keys were added: - resources.labels.methods.updatePermissions (Total Keys: 13) - resources.labels.resources.permissions.methods.batchDelete.parameters.parent (Total Keys: 4) The following keys were changed: - resources.labels.resources.permissions.methods.batchDelete (Total Keys: 2) --- docs/dyn/drivelabels_v2beta.labels.html | 40 +++++++ ...drivelabels_v2beta.labels.permissions.html | 46 +------- .../drivelabels_v2beta.labels.revisions.html | 40 +++++++ ...s_v2beta.labels.revisions.permissions.html | 47 +------- .../documents/drivelabels.v2.json | 2 +- .../documents/drivelabels.v2beta.json | 104 +++++++++--------- 6 files changed, 139 insertions(+), 140 deletions(-) diff --git a/docs/dyn/drivelabels_v2beta.labels.html b/docs/dyn/drivelabels_v2beta.labels.html index 02cfb3d3e44..2c6b5dac2b3 100644 --- a/docs/dyn/drivelabels_v2beta.labels.html +++ b/docs/dyn/drivelabels_v2beta.labels.html @@ -122,6 +122,9 @@

Instance Methods

updateLabelCopyMode(name, body=None, x__xgafv=None)

Updates a Label's `CopyMode`. Changes to this policy are not revisioned, do not require publishing, and take effect immediately.

+

+ updatePermissions(parent, body=None, useAdminAccess=None, x__xgafv=None)

+

Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

Method Details

close() @@ -3146,4 +3149,41 @@

Method Details

}
+
+ updatePermissions(parent, body=None, useAdminAccess=None, x__xgafv=None) +
Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
+
+Args:
+  parent: string, Required. The parent Label resource name. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # The permission that applies to a principal (user, group, audience) on a label.
+  "audience": "A String", # Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the Label.
+  "email": "A String", # Specifies the email address for a user or group pricinpal. Not populated for audience principals. User and Group permissions may only be inserted using email address. On update requests, if email address is specified, no principal should be specified.
+  "group": "A String", # Group resource name.
+  "name": "A String", # Resource name of this permission.
+  "person": "A String", # Person resource name.
+  "role": "A String", # The role the principal should have.
+}
+
+  useAdminAccess: boolean, Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # The permission that applies to a principal (user, group, audience) on a label.
+  "audience": "A String", # Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the Label.
+  "email": "A String", # Specifies the email address for a user or group pricinpal. Not populated for audience principals. User and Group permissions may only be inserted using email address. On update requests, if email address is specified, no principal should be specified.
+  "group": "A String", # Group resource name.
+  "name": "A String", # Resource name of this permission.
+  "person": "A String", # Person resource name.
+  "role": "A String", # The role the principal should have.
+}
+
+ \ No newline at end of file diff --git a/docs/dyn/drivelabels_v2beta.labels.permissions.html b/docs/dyn/drivelabels_v2beta.labels.permissions.html index 6edc012ebcb..65b35dd6616 100644 --- a/docs/dyn/drivelabels_v2beta.labels.permissions.html +++ b/docs/dyn/drivelabels_v2beta.labels.permissions.html @@ -75,7 +75,7 @@

Drive Labels API . labels . permissions

Instance Methods

- batchDelete(labelsId, body=None, x__xgafv=None)

+ batchDelete(parent, body=None, x__xgafv=None)

Deletes Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

batchUpdate(parent, body=None, x__xgafv=None)

@@ -95,16 +95,13 @@

Instance Methods

list_next()

Retrieves the next page of results.

-

- patch(parent, body=None, useAdminAccess=None, x__xgafv=None)

-

Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

Method Details

- batchDelete(labelsId, body=None, x__xgafv=None) + batchDelete(parent, body=None, x__xgafv=None)
Deletes Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
 
 Args:
-  labelsId: string, A parameter (required)
+  parent: string, Required. The parent Label resource name shared by all permissions being deleted. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field. (required)
   body: object, The request body.
     The object takes the form of:
 
@@ -286,41 +283,4 @@ 

Method Details

-
- patch(parent, body=None, useAdminAccess=None, x__xgafv=None) -
Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
-
-Args:
-  parent: string, Required. The parent Label resource name. (required)
-  body: object, The request body.
-    The object takes the form of:
-
-{ # The permission that applies to a principal (user, group, audience) on a label.
-  "audience": "A String", # Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the Label.
-  "email": "A String", # Specifies the email address for a user or group pricinpal. Not populated for audience principals. User and Group permissions may only be inserted using email address. On update requests, if email address is specified, no principal should be specified.
-  "group": "A String", # Group resource name.
-  "name": "A String", # Resource name of this permission.
-  "person": "A String", # Person resource name.
-  "role": "A String", # The role the principal should have.
-}
-
-  useAdminAccess: boolean, Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.
-  x__xgafv: string, V1 error format.
-    Allowed values
-      1 - v1 error format
-      2 - v2 error format
-
-Returns:
-  An object of the form:
-
-    { # The permission that applies to a principal (user, group, audience) on a label.
-  "audience": "A String", # Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the Label.
-  "email": "A String", # Specifies the email address for a user or group pricinpal. Not populated for audience principals. User and Group permissions may only be inserted using email address. On update requests, if email address is specified, no principal should be specified.
-  "group": "A String", # Group resource name.
-  "name": "A String", # Resource name of this permission.
-  "person": "A String", # Person resource name.
-  "role": "A String", # The role the principal should have.
-}
-
- \ No newline at end of file diff --git a/docs/dyn/drivelabels_v2beta.labels.revisions.html b/docs/dyn/drivelabels_v2beta.labels.revisions.html index e2cd301f31d..06b758905ac 100644 --- a/docs/dyn/drivelabels_v2beta.labels.revisions.html +++ b/docs/dyn/drivelabels_v2beta.labels.revisions.html @@ -87,10 +87,50 @@

Instance Methods

close()

Close httplib2 connections.

+

+ updatePermissions(parent, body=None, useAdminAccess=None, x__xgafv=None)

+

Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

Method Details

close()
Close httplib2 connections.
+
+ updatePermissions(parent, body=None, useAdminAccess=None, x__xgafv=None) +
Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
+
+Args:
+  parent: string, Required. The parent Label resource name. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # The permission that applies to a principal (user, group, audience) on a label.
+  "audience": "A String", # Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the Label.
+  "email": "A String", # Specifies the email address for a user or group pricinpal. Not populated for audience principals. User and Group permissions may only be inserted using email address. On update requests, if email address is specified, no principal should be specified.
+  "group": "A String", # Group resource name.
+  "name": "A String", # Resource name of this permission.
+  "person": "A String", # Person resource name.
+  "role": "A String", # The role the principal should have.
+}
+
+  useAdminAccess: boolean, Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # The permission that applies to a principal (user, group, audience) on a label.
+  "audience": "A String", # Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the Label.
+  "email": "A String", # Specifies the email address for a user or group pricinpal. Not populated for audience principals. User and Group permissions may only be inserted using email address. On update requests, if email address is specified, no principal should be specified.
+  "group": "A String", # Group resource name.
+  "name": "A String", # Resource name of this permission.
+  "person": "A String", # Person resource name.
+  "role": "A String", # The role the principal should have.
+}
+
+ \ No newline at end of file diff --git a/docs/dyn/drivelabels_v2beta.labels.revisions.permissions.html b/docs/dyn/drivelabels_v2beta.labels.revisions.permissions.html index 1d3934224fc..12195b56c57 100644 --- a/docs/dyn/drivelabels_v2beta.labels.revisions.permissions.html +++ b/docs/dyn/drivelabels_v2beta.labels.revisions.permissions.html @@ -75,7 +75,7 @@

Drive Labels API . labels . revisions . permissions

Instance Methods

- batchDelete(labelsId, revisionsId, body=None, x__xgafv=None)

+ batchDelete(parent, body=None, x__xgafv=None)

Deletes Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

batchUpdate(parent, body=None, x__xgafv=None)

@@ -95,17 +95,13 @@

Instance Methods

list_next()

Retrieves the next page of results.

-

- patch(parent, body=None, useAdminAccess=None, x__xgafv=None)

-

Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

Method Details

- batchDelete(labelsId, revisionsId, body=None, x__xgafv=None) + batchDelete(parent, body=None, x__xgafv=None)
Deletes Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
 
 Args:
-  labelsId: string, A parameter (required)
-  revisionsId: string, A parameter (required)
+  parent: string, Required. The parent Label resource name shared by all permissions being deleted. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field. (required)
   body: object, The request body.
     The object takes the form of:
 
@@ -287,41 +283,4 @@ 

Method Details

-
- patch(parent, body=None, useAdminAccess=None, x__xgafv=None) -
Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
-
-Args:
-  parent: string, Required. The parent Label resource name. (required)
-  body: object, The request body.
-    The object takes the form of:
-
-{ # The permission that applies to a principal (user, group, audience) on a label.
-  "audience": "A String", # Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the Label.
-  "email": "A String", # Specifies the email address for a user or group pricinpal. Not populated for audience principals. User and Group permissions may only be inserted using email address. On update requests, if email address is specified, no principal should be specified.
-  "group": "A String", # Group resource name.
-  "name": "A String", # Resource name of this permission.
-  "person": "A String", # Person resource name.
-  "role": "A String", # The role the principal should have.
-}
-
-  useAdminAccess: boolean, Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.
-  x__xgafv: string, V1 error format.
-    Allowed values
-      1 - v1 error format
-      2 - v2 error format
-
-Returns:
-  An object of the form:
-
-    { # The permission that applies to a principal (user, group, audience) on a label.
-  "audience": "A String", # Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the Label.
-  "email": "A String", # Specifies the email address for a user or group pricinpal. Not populated for audience principals. User and Group permissions may only be inserted using email address. On update requests, if email address is specified, no principal should be specified.
-  "group": "A String", # Group resource name.
-  "name": "A String", # Resource name of this permission.
-  "person": "A String", # Person resource name.
-  "role": "A String", # The role the principal should have.
-}
-
- \ No newline at end of file diff --git a/googleapiclient/discovery_cache/documents/drivelabels.v2.json b/googleapiclient/discovery_cache/documents/drivelabels.v2.json index 80f652d6501..ff890ea29a2 100644 --- a/googleapiclient/discovery_cache/documents/drivelabels.v2.json +++ b/googleapiclient/discovery_cache/documents/drivelabels.v2.json @@ -217,7 +217,7 @@ } } }, - "revision": "20221010", + "revision": "20221026", "rootUrl": "https://drivelabels.googleapis.com/", "schemas": { "GoogleAppsDriveLabelsV2BadgeColors": { diff --git a/googleapiclient/discovery_cache/documents/drivelabels.v2beta.json b/googleapiclient/discovery_cache/documents/drivelabels.v2beta.json index 81623d0fb78..dafc5ec4d58 100644 --- a/googleapiclient/discovery_cache/documents/drivelabels.v2beta.json +++ b/googleapiclient/discovery_cache/documents/drivelabels.v2beta.json @@ -396,6 +396,36 @@ "response": { "$ref": "GoogleAppsDriveLabelsV2betaLabel" } + }, + "updatePermissions": { + "description": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2beta/labels/{labelsId}/permissions", + "httpMethod": "PATCH", + "id": "drivelabels.labels.updatePermissions", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent Label resource name.", + "location": "path", + "pattern": "^labels/[^/]+$", + "required": true, + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "location": "query", + "type": "boolean" + } + }, + "path": "v2beta/{+parent}/permissions", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + } } }, "resources": { @@ -444,16 +474,18 @@ "httpMethod": "POST", "id": "drivelabels.labels.permissions.batchDelete", "parameterOrder": [ - "labelsId" + "parent" ], "parameters": { - "labelsId": { + "parent": { + "description": "Required. The parent Label resource name shared by all permissions being deleted. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.", "location": "path", + "pattern": "^labels/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta/labels/{labelsId}/permissions:batchDelete", + "path": "v2beta/{+parent}/permissions:batchDelete", "request": { "$ref": "GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest" }, @@ -580,12 +612,16 @@ "response": { "$ref": "GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse" } - }, - "patch": { + } + } + }, + "revisions": { + "methods": { + "updatePermissions": { "description": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", - "flatPath": "v2beta/labels/{labelsId}/permissions/{permissionsId}", + "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions", "httpMethod": "PATCH", - "id": "drivelabels.labels.permissions.patch", + "id": "drivelabels.labels.revisions.updatePermissions", "parameterOrder": [ "parent" ], @@ -593,7 +629,7 @@ "parent": { "description": "Required. The parent Label resource name.", "location": "path", - "pattern": "^labels/[^/]+/permissions/[^/]+$", + "pattern": "^labels/[^/]+/revisions/[^/]+$", "required": true, "type": "string" }, @@ -603,7 +639,7 @@ "type": "boolean" } }, - "path": "v2beta/{+parent}", + "path": "v2beta/{+parent}/permissions", "request": { "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" }, @@ -611,9 +647,7 @@ "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" } } - } - }, - "revisions": { + }, "resources": { "locks": { "methods": { @@ -660,22 +694,18 @@ "httpMethod": "POST", "id": "drivelabels.labels.revisions.permissions.batchDelete", "parameterOrder": [ - "labelsId", - "revisionsId" + "parent" ], "parameters": { - "labelsId": { - "location": "path", - "required": true, - "type": "string" - }, - "revisionsId": { + "parent": { + "description": "Required. The parent Label resource name shared by all permissions being deleted. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.", "location": "path", + "pattern": "^labels/[^/]+/revisions/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions:batchDelete", + "path": "v2beta/{+parent}/permissions:batchDelete", "request": { "$ref": "GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest" }, @@ -802,36 +832,6 @@ "response": { "$ref": "GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse" } - }, - "patch": { - "description": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", - "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions/{permissionsId}", - "httpMethod": "PATCH", - "id": "drivelabels.labels.revisions.permissions.patch", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent Label resource name.", - "location": "path", - "pattern": "^labels/[^/]+/revisions/[^/]+/permissions/[^/]+$", - "required": true, - "type": "string" - }, - "useAdminAccess": { - "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", - "location": "query", - "type": "boolean" - } - }, - "path": "v2beta/{+parent}", - "request": { - "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" - }, - "response": { - "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" - } } } } @@ -888,7 +888,7 @@ } } }, - "revision": "20221010", + "revision": "20221026", "rootUrl": "https://drivelabels.googleapis.com/", "schemas": { "GoogleAppsDriveLabelsV2betaBadgeColors": {